I have done something similar before but here is a fresh look at building a simple InDesign document, adding some paragraph and character styles and tags - and then building a relationship between them.
We look at what goes into a basic HTML document and how to apply styles with CSS. An important point is made about the use of standard HTML markup to get proper document structure.
If we source a public domain text on the web, such as those from the Gutenberg project, we may well find that each line of thext has a fixed length. This is because the text was probably scanned in and then converted to real text through OCR software. The text is laid out exactly as it was in the original source. This facsimile is not appropriate for our needs.