> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/template-architecture/template-authoring/s-docs-template-development-best-practices.md).

# S-Docs Template Development Best Practices

{% stepper %}
{% step %}

### Put everything inside basic tables, even headers and footers

Keep all layout and structure within basic HTML tables.
{% endstep %}

{% step %}

### Don’t use the same styling as a modern website.

Avoid modern webpage styling; prefer email/template-safe, table-based styles.
{% endstep %}

{% step %}

### Standard recommended style statement for a table

Use the following table declaration as the recommended starting point:

{% code title="Recommended table style" %}

```html
<table border="0" cellpadding=“0” cellspacing="0" style="border-collapse: collapse; border: none; font-family:Arial Unicode MS,sans-serif; font-size: 9pt; width: 100%;">
```

{% endcode %}
{% endstep %}

{% step %}

### Avoid using elements that have built-in styling

Do not use `<p>`, `<th>`, `<ul>`, `<li>`, or anything that has built-in browser styling.
{% endstep %}

{% step %}

### Only use `<span>` when necessary

Prefer minimal inline elements; reserve `<span>` for when it's required.
{% endstep %}

{% step %}

### Font-family considerations

Note: `Arial Unicode MS` sometimes will not show bolded text in Chrome's PDF preview, but it will once the template is downloaded.
{% endstep %}

{% step %}

### Avoid using margin

For spacing, prefer table-based techniques:

* For horizontal spacing use:

  <pre class="language-html" data-title="Horizontal spacing example"><code class="lang-html">&#x3C;tr>&#x3C;td style="line-height:20px;width:100%;">&#x26;nbsp;&#x26;nbsp;&#x3C;/td>&#x3C;/tr>
  </code></pre>
* Use extra blank columns for side margins.
  {% endstep %}

{% step %}

### Use percent for column widths

For column widths use percent values instead of px.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/sdocs/template-architecture/template-authoring/s-docs-template-development-best-practices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
