skip to main content
Block HTML
The common markup language for web technology, HTML, can be used in Markdown documents on the block level. Refer to W3Schools' HTML Tutorial to learn more about how to write and use HTML.
Syntax
Block HTML is created by writing a valid HTML fragment on a line or set of lines. HTML syntax must be the first thing on the line to be considered Block HTML.
Basics
Simple Block HTML using a p element.
<p>A simple paragraph element.</p>
Multi-Line HTML
HTML can span multiple lines. Keep it compact. An empty line will break the fragment in two, so it is best used to separate the fragment from other content.
<table>
  <tr>
    <th>Name</th>
    <th>Age</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>John Doe</td>
    <td>35</td>
    <td>USA</td>
  </tr>
  <tr>
    <td>Jane Doe</td>
    <td>32</td>
    <td>USA</td>
  </tr>
</table>
No Markdown in Block HTML
Markdown syntax can't be used inside of Block HTML. The entire HTML fragment is passed straight to the output as-is.
<p>No **Markdown** here.</p>
Markdown++
A custom Paragraph Style can be given to Block HTML using a Markdown++ style tag on the line directly above the Block HTML.
<!--style:CustomHTML-->
<p>HTML block given the style name "CustomHTML"</p>
To learn more about Markdown++ tagging, see Learning Markdown++.
ePublisher Style Information
Style Behavior
All HTML fragments are wrapped in a container element, which is given a style name. The default name is HTML, but can also be a custom name if the style tag is used directly above an HTML fragment.
HTML is unavailable for publishing in PDF or PDF XSL-FO output due to incompatibility with those technologies. ePublisher will remove any HTML content it detects before generating PDF output.
Default Style Properties
Style Type: Paragraph
Style Name: HTML
Property
Value
display
block
overflow
auto
If a custom style name is assigned to a Block HTML, that style name will still inherit all of the listed default style information.
Was this helpful?
Last modified date: 11/15/2024