There are two ways to answer your question in a comment about paragraphs in HTML.
###Styles
Both Writer and HTML use styles and separate content from rendering. You are probably familiar with Writer paragraph styles and browsers use a similar approach for formatting on screen. The most known device is CSS styles (but others are available).
When Writer converts a document to save it as HTML, it tries to preserve its formatting by translating its Writer styles into CSS styles. Not all attributes have a CSS counterpart but the conversion is generally correct
CAUTION! For an unknown reason, the conversion is broken if your paragraph style has both spacing above and below set to zero. The converter uses then above=0 and below=0.25cm. To get the illusion of no-space, use something like above=0.01cm and below=0.
###Line break
You can cause a line break to be inserted in your paragraph with Shift
+Enter
. You don’t leave the paragraph, you only instruct the formatter to stop filling the line with what it has already collected and to not justify it. The paragraph continues normally on next line. This translates as <br>
in the HTML.
*Don’t abuse the Shift
+Enter
device. If logically the parts before and after are paragraphs, they should be separated with Enter
and the relative spacing set with styles.
##Importance of file format
If you start from a standard text document .odt, everything I wrote will give you faithfully the expected result… Just “export” as .html when you need to change the page in your site.
If you create the page with File
>New
>HTML Document
, CSS formatting instructions are not as exhaustive as they could be. Taking the example of paragraphs in Text Body where I changed the spacing below, only the modified parameters were translated into CSS. Considering the CSS inheritance rules, this means the non described attributes like margin or padding are taken from the default CSS style collection.
In the case of my Text Body, only margin-bottom was set. All paddings and margin-top come from the default CSS stylesheet which is internal to the browser. Consequently, the rendering by the browser may look very different from the one by Writer.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer) or comment the relevant answer.