Image inside <h2> tag?

Hello All,

I have a SEO related question. I know that h1, h2, h3, ECT tags are important for SEO. Will it have the same effect if I were to put an image inside the header tags and still have the same effect with the alt text?

Thanks ahead of time,

It might have an increased effect, but I think it could cause some usability problems for people using assistive devices, such as screen readers. Just bear in mind that I am not an SEO expert, so I could be wrong. Or I could be right. I’ll let one of our resident experts make that determination.

If you want to have an image inside a heading tag pair, looking into CSS image replacement may be a good idea.

Here are a couple links to get you started: (for links)

I’m no SEO expert either, but I do agree with Dan on this. Design for your users first and the SEs second. Both the “H” elements and IMG are block level elements. My opinion is that the only time you should put a block within a block is when you need to nest divisions (DIV).

A while back, someone here (in another forum) directed me to read up on semantic mark-up. Semantic mark-up makes sure that what your users ‘see’ is really what they get and it’s also a very search engine friendly way to build a page. Anyway, here’s the link that got me started. Links to other excellent articles are at the bottom of the page. :slight_smile:

IMG is an inline element, actually. :slight_smile: Also, block elements can be nested (such as multiple DIVs) without worries or fear. After all, what are nested lists, or pargraphs inside DIV containers? :wink:

Re: usability, screen readers (at least mine) can handle that just fine, as long as there is an alt tag.

Oh my bad! It’s a good thing I’m not a drinker since my brain cells are doing just fine dying on their own. :frowning:

However, after doing some research I find that the img is not inline but defined as a replaced element. Anyway, though, I think we have all put an image inside a paragraph or heading tag at one time or another for purposes of display. At least (on second thought) I have. What I meant is that I don’t believe it’s good practice to make an image the only element inside a tag… unless it’s a division, which is meant to make a “family” (couldn’t think of the right word - there go those brain cells again (: ) out of several different elements.