HTML and CSS Reference
In-Depth Information
By fixing these two elements, you reduced the size of the error list from nine to six
items. You can trim that down even more. The first error in the latest list states
Line 63, column 12 : document type does not allow element “p” here; missing one of
“object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag
ƒƒƒƒƒƒ<p >
which can indicate that an element has been improperly nested within a paragraph
element—but read on. Another error states
Line 84, column 12 : tag for “p” omitted, but OMittAG nO was specified
ƒƒƒƒƒƒ</div >
which indicates that the paragraph element was not properly closed due to the absence
of the closing </p> tag. In this case, the same mistake has caused both errors. Because
the paragraph element is not closed, it appears that other elements have been improperly
placed inside of it. By adding the closing tag, both errors should be corrected.
To fix the errors in the Web page paragraphs:
1. Return to the works.htm file in your text editor.
2. Locate the three paragraph elements in the main section, and then add a closing
</p> tag to each paragraph, as shown in Figure 9-19.
figure 9-19
closing the paragraph elements
closing </p> tags added
to the three paragraphs
3. Save your changes, and then return to the W3C validator page. Click the Refresh or
Reload button in your browser to redo the validation check. As shown in Figure 9-20,
the page should now pass the validation check under the XHTML 1.0 transitional DTD.
Search WWH ::

Custom Search