While using h1-h6 tags in my html, i keep getting error messages on w3c validator. I'm new to this and I've tried so many times to solve the problem but i can't.
The text appears perfectly fine on my website but it won't validate. How do i solve this problem? The error message is as follows;
Line 34, Column 4: document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h1><span> My website </h1>< span>
<----this is the code i'm getting the error for.
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 "
" or "") inside an inline element (such as "", "", or "").
In any case what's the best way to use header tags? What am I doing wrong?