HTML and CSS Reference
In-Depth Information
Alice didn't like this idea at all: so, to change the
subject, she asked 'Does she ever come out here?'
<p>
'I daresay you'll see her soon,' said the Rose. 'She's one
of the thorny kind.'
<p>
'Where does she wear the thorns?' Alice asked with some
curiosity.
<p>
When encountering text such as this, you'll want to turn each <p> into a </p> , and then add the missing start-
tags like so:
<p>Alice didn't like this idea at all: so, to change the
subject, she asked 'Does she ever come out here?'
</p>
<p>'I daresay you'll see her soon,' said the Rose.
'She's one of the thorny kind.'
</p>
<p>'Where does she wear the thorns?' Alice asked with some
curiosity.
</p>
Tidy and TagSoup can fix this. However, they usually incorrectly guess the proper location of the start-tag and
produce markup such as this:
Alice didn't like this idea at all: so, to change the
subject, she asked 'Does she ever come out here?'
<p>
'I daresay you'll see her soon,' said the Rose.
'She's one of the thorny kind.'
</p>
<p>'Where does she wear the thorns?' Alice asked with some
curiosity.
</p>
<p>
</p>
Tidy doesn't add the closing empty paragraph, but it still fails to find the start of the first paragraph. You can tell
Tidy to wrap paragraphs around orphan text blocks using the --enclose-block-text option with the value y :
$ tidy -asxhtml --enclose-block-text y endtag.html
This doesn't matter for basic browser display, but it matters a great deal if you've assigned any specific CSS
style rules to the p element. Furthermore, it can apply special formatting intended for the first paragraph of a
chapter or section to the second instead.
Search WWH ::




Custom Search