When using the h1-h6 tags in my html, I keep getting error messages on the w3c validator. I am new to this and I have tried many times to solve the problem, but I cannot.
On my website, the text looks great, but it will not be checked. How to solve this problem? The error message is as follows:
Row 34, column 4: the document type does not allow the element "h1" here; missing one of the "objects", "applet", "map", "iframe", "button", "ins", "del" start tag
<h1><span> My website </h1>< span> <---- is the code for which I am getting an error.
The specified item is not allowed to appear in the context in which you placed it; the other mentioned elements are the only two allowed there and may contain the said element. This may mean that you need a containing element, or it may be that you forgot to close the previous element.
One possible reason for this message is that you tried to place a block element element (for example, "
"or") inside an inline element (for example, "", "" or "").
Anyway, what's the best way to use header tags? What am I doing wrong?
Richard
source share