Page 1 of 1

ODT to HTML, formatting

Posted: Thu Oct 15, 2020 10:10 pm
by ufoplus
Hi all,

I'm new here, but would love some advice please.

I'm working on an ODT text doc, with various headings and paragraphs, which I save separately as an HTML file
- and looks great when viewed as a web page in my browser.

In the ODT version, I create indents for my paragraphs & headings, using the tab key & the space bar on my Mac keyboard, and they look fine.
But when I view a saved HTML copy, all those same indents I've created have disappeared - they don't show up, no matter what I try.

Does anyone know what keys I need to use to retain them in the HTML version?

Thanks

Re: ODT to HTML, formatting

Posted: Fri Oct 16, 2020 12:10 am
by robleyd
Use Styles to create your indents, setting the first line indent to a suitable value. There is an existing style First line indent which might suit your purposes.

Web browsers treat tabs, line breaks and multiple spaces differently from what you might expect - they are all considered white space and simply rendered as a single space character.

Re: ODT to HTML, formatting

Posted: Fri Oct 16, 2020 10:13 am
by Bill
Using tabs and spaces to indent paragraphs is a legacy technique that was used on typewriters. A look at the HTML code produced by Writer reveals that tabs and spaces at the beginning of a paragraph are not exported by Writer, so tabs and spaces can not be used to indent paragraphs.

Using Writer, the indents should be set as paragraph attributes in the paragraph style. These indent settings are exported in the HTML document using the HTML Style attribute.

Re: ODT to HTML, formatting

Posted: Sun Oct 18, 2020 12:51 am
by ufoplus
Thank you - that helped !