I want to put an image inside an h2, next to the content for the h2, because the image would line up better. Is there anything to consider as far as semantics or hierarchy when doing so?
3:51 am on Mar 15, 2011 (gmt 0)
I doubt it will cause any issues, but if you have room for both you could probably set a width on each and float the h2 to one side and the image to the other, which would keep them separated.
4:07 am on Mar 15, 2011 (gmt 0)
4:14 am on Mar 15, 2011 (gmt 0)
Np ... Just remember if you float elements you'll want to clear your floats or you may get unexpected and undesired formatting on other elements.
10:41 am on Mar 15, 2011 (gmt 0)
heading: h1, h2, h3 etc
header: a new tag in html5 to designate a header.
header: also conventionally used to describe the top of the page where the logo etc is located, there was no specific tag (before html5) to define this
12:05 pm on Mar 15, 2011 (gmt 0)
Eek, in my experience text H2 has definite value. If your dead on doing this, make sure you give the image a decent alt tag.
We're at a point, right now, pre-HTML5, where if using text for things like headings isn't viable in the design, I'd redesign. If you don't have great headings, and your competior does, you've got to do way more offsite stuff to keep up. Your potentially creating a mammoth task down the line in the name of saving a bit of time now. Shortcuts make long journeys and all that.