Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Heading tags h1,h2,h3 and images

With heading tags can you put a image in them as well like this.

 <h2><img src="/images/base/headingicons/art_img.png" width="37" height="29">My Heading</h2>

Some people do a h2 tag with a background css but that is way to much code having a css rule for different heading image tags.  
0
stargateatlantis
Asked:
stargateatlantis
1 Solution
 
EyalCommented:
yes you can
0
 
level9wizardCommented:
I don't think you've asked anything here... can you reword this in the form of a question?

Just as an FYI, your code above is missing a closing img tag (depending on your DOCTYPE) and and alt tag as well. You can actually use the contents of the img alt tag as the heading, so for example you could have:

<h2><img src="/images/base/headingicons/art_img.png" style="width:37px; height: 29px" alt="My Heading" /></h2>
0
 
stargateatlantisAuthor Commented:
Thanks for the information.  
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now