Free Support Forum -

Inline CSS styles in HTML documents

Hello Auckland team,

In the API reference for Aspose.Words it is stated that "inline css styles" are supported when reading in an HTML document via the Document object. I have not been able to make this work. What exactly do you mean by "inline css styles"?

I am guessing that you mean the "style" attribute in the html class has to be defined. If so why doesn't it work for me on a very simple html document that has style attributes in the html tags


some text here


Thank in advance,


In our convertors information spreadsheet it is said that inline style is supported for p tag, but limited to paragraph attributes exported by Aspose.Words. Font-name and font-size attributes are related to character formatting and are currently supported only for s (span) style. Also only points are supported for size values. Pixels and inches are not supported.

We plan to add richer support for HTML export/import later this year.

Best regards,