When HtmlSaveOptions.CssStyleSheetType set to Embedded the resulting html markup still contains inline styles. I didn’t find any information how CssStyleSheetType.Embedded should affect resulting html. I have attached conversion results for both CssStyleSheetType.Embedded and CssStyleSheetType.Inline. Desired behaviour for me is to get html document without inline styles and to have all styles in style tag inside head tag. It there any way to do it?
Examples.zip (3.4 KB)
@VitaliyT85 I am afraid there is no way to fully avoid inline styles in the output HTML. In MS Word document formatting can be applied on different levels. For example paragraph formatting can be applied through the style applied to the paragraph and explicitly to the paragraph through it’s properties. In this case when CssStyleSheetType.Embedded
is used, the style formatting will be written as CSS style and explicitly applied formatting will be written as inline formatting to the <P>
element in HTML.