Contents and styles are added with a file or URL HTML/CSS and the "-i" parameter:
dynadocx -i content.html
It is possible to include one or more content files with the same command.
Compatible HTML tags
tag |
description |
<a> |
link |
<b>, <strong> |
bold text |
<br> |
line, page and column break |
<cite>, <em>, <i> |
italic text |
<del>, <s>, <strike> |
line through text |
<ins>, <u> |
underline text |
<h1>, <h2>, <h3>, <h4>, <h5>, <h6> |
heading |
<hr> |
horizontal line |
<mark> |
highlighted text |
<p> |
paragraph |
<span> |
inline container |
<sub> |
subscript text |
<sup> |
superscript text |
Compatible CSS selectors
selector |
description |
element |
tag {style: value;} |
class |
.class {style: value;} |
id |
#id {style: value;} |
element.class |
tag.class {style: value;} |
element#id |
tag#id {style: value;} |
element, element |
tag, tag {style: value;} |
Detail of compatible tags, attributes and styles
<a>
attribute |
description |
class |
one or more classnames |
data-style |
custom character style (rStyle). Default: Hyperlink |
href |
external link (http://domain) or bookmark link (#id) |
id |
unique id |
style |
inline CSS styles |
style |
description |
background-color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
font-family |
Font family. Needs to be available in the OS or embedded in the document. Inherit. |
font-size |
Font size: cm, in, mm, pc, pt, px. Inherit. |
font-style |
Font style: italic, normal, oblique. Inherit. |
font-weight |
Font weight: bold, bolder, normal, 700, 800, 900. Inherit. |
text-decoration |
Text decoration: underline, line-through, none. Inherit. |
vertical-align |
Vertical align: baseline, sub, sup, text-bottom, text-top. |
<br>
attribute |
description |
data-type |
Break type: empty, column, page, textWrapping. |
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
attribute |
description |
class |
one or more classnames |
data-style |
custom paragraph style (pStyle). Default: Heading1 (<h1>), Heading2 (<h2>), Heading3 (<h3>), Heading4 (<h4>), Heading5 (<h5>), Heading6 (<h6>) |
id |
unique id. Generate a bookmark |
style |
inline CSS styles |
style |
description |
background-color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
font-family |
Font family. Needs to be available in the OS or embedded in the document. Inherit. |
font-size |
cm, in, mm, pc, pt, px. Inherit. |
font-style |
Font style: italic, normal, oblique. Inherit. |
font-weight |
Font weight: bold, bolder, normal, 700, 800, 900. Inherit. |
page-break-before |
Do a page break: always, auto. |
text-align |
Text alignment: center, distribute, justify, left, right. Inherit. |
text-decoration |
Text decoration: underline, line-through, none. Inherit. |
<hr>
attribute |
description |
class |
one or more classnames |
id |
unique id |
style |
inline CSS styles |
style |
description |
color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. Default: ACA899 |
height |
Height: cm, in, mm, pc, pt, px. Default: 1.5 |
text-align |
Align: center, left, right. Inherit. Default: center |
width |
Width: cm, in, mm, pc, pt, px. Default: full width |
<p>
attribute |
description |
class |
one or more classnames |
data-style |
custom paragraph style (pStyle) |
id |
unique id. Generate a bookmark |
style |
inline CSS styles |
style |
description |
background-color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
font-family |
Font family. Needs to be available in the OS or embedded in the document. Inherit. |
font-size |
cm, in, mm, pc, pt, px. Inherit. |
font-style |
Font style: italic, normal, oblique. Inherit. |
font-weight |
Font weight: bold, bolder, normal, 700, 800, 900. Inherit. |
page-break-before |
Do a page break: always, auto. |
text-align |
Text alignment: center, distribute, justify, left, right. Inherit. |
text-decoration |
Text decoration: underline, line-through, none. Inherit. |
<span>
(<b>, <cite>, <del>, <em>, <i>, <ins>, <mark>, <s>, <strike>, <strong>, <sub>, <sup>, <u>)
attribute |
description |
class |
one or more classnames |
data-style |
custom character style (rStyle) |
id |
unique id |
style |
inline CSS styles |
style |
description |
background-color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
color |
Color: name, HEX, rgb, rgba (alpha value is ignored). Inherit. |
font-family |
Font family. Needs to be available in the OS or embedded in the document. Inherit. |
font-size |
Font size: cm, in, mm, pc, pt, px. Inherit. |
font-style |
Font style: italic, normal, oblique. Inherit. |
font-weight |
Font weight: bold, bolder, normal, 700, 800, 900. Inherit. |
text-decoration |
Text decoration: underline, line-through, none. Inherit. |
vertical-align |
Vertical align: baseline, sub, sup, text-bottom, text-top. |
How to add CSS
CSS can be added using the following ways:
Inline CSS
<p style="color: red;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
Internal CSS (style tags)
<head>
<style>
p {
font-weight: bold;
}
</style>
</head>
External CSS
<head>
<link rel="stylesheet" href="styles.css">
</head>
<head>
<link rel="stylesheet" href="https://www.domain.com/styles.css">
</head>
Import CSS
<head>
<style>
@import "styles.css";
</style>
</head>
<head>
<style>
@import url("https://domain.com/styles.css");
</style>
</head>
Base CSS
The following default styles are applied when importing HTML:
mark {
background-color: yellow;
}