MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
September
Sun Mon Tue Wed Thu Fri Sat
   
26
     
2009
Months
Sep


Sat, Sep 26, 2009 5:51 pm

HR Tag Within Pre Tag

When I checked a webpage for HTML errors using the W3Creg; Markup Validation Service, I saw errors such as the following reported:

Error Line 165, Column 4: document type does not allow element "HR" here; missing one of "MAP", "IFRAME", "BUTTON" start-tag

<hr>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

The problem occurred because I had placed <hr> between <pre> and </pre> tags. I had something like the following:

<pre>
This is some text
<hr>
This is some more text
</pre>

I eliminated the error by placing a end pre tag after the first block of text and a begin pre tag before the second block of text.

<pre>
This is some text
</pre>
<hr>
<pre>
This is some more text
</pre>

References:

  1. CSS - html/css validation error
    Date: 2008-02-25
    Ultrashock Forums

[/network/web/html] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo