Bit of an odd question/problem...
Hey folks. I'm trying to make some buttons with css. I've got 4 <h3> tags which I've designed with css to look like buttons, then I wrapped them in <a> tags to become links, but it doesn't validate with w3.
here's the error, which I get 4 times for each of the <h3> links.
Line 45, Column 57:
Document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<a href="#"><h3>Unique Website Design</h3></a>
Is it not possible to use a <h3> as a link?
Then reason why I want to use h3 for my links, is because I'm under then impression that it may be better for SEO. If this is not the case, please let me know so I can just use a div instead.
<h3><a href="#" style="display:block;">Unique Website Design</a></h3>
Thanks, but could you possibly explain that?
edit: didn't fix it,
Line 45, Column 101:
document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
… style="display:block; text-decoration:none"><h3>Unique Website Design</h3></a>
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>").
Last edited by deXtrous; 06-17-2010 at 01:47 AM.
The link goes INSIDE the header element. Giving the link display:block means it fills the space allocated to the header.
Perfect thanks! sorry about that
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)