HtmlCssStyleSheetType Enum

Wordize.Saving.HtmlCssStyleSheetType enum. Specifies how CSS Cascading Style Sheet styles are exported to HTML.

HtmlCssStyleSheetType enumeration

Specifies how CSS (Cascading Style Sheet) styles are exported to HTML.

public enum HtmlCssStyleSheetType

Values

NameValueDescription
Inline0CSS styles are written inline (as a value of the style attribute on every element).
Embedded1CSS styles are written separately from the content in a style sheet embedded in the HTML file.
External2CSS styles are written separately from the content in a style sheet in an external file. The HTML file links the style sheet.

Examples

Shows how to specify a prefix which is added to all CSS class names.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.CssClassNamePrefix = "mycss_";
htmlSaveOptions.CssStyleSheetType = HtmlCssStyleSheetType.External;
htmlSaveOptions.CssStyleSheetFileName = "my_styles.css";

Converter.Create()
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "HtmlSaveOptions.CssClassNamePrefix.html", htmlSaveOptions)
    .Execute();

See Also