February 26, 201016 yr Just need a little help really, I have seen a few websites which have multiple H1 & H2 tags with no images but different colours, how is this done? Thanks Edited February 26, 201016 yr by Sam G moved from General Chat
February 26, 201016 yr Do you mean: <!-- HTML --> <h1>My Title</h1> <h2 class="red">Second Title</h2> <h2 class="green">Third Title</h2> <!-- END HTML --> /* CSS */ .red { color:#ff0000; } .green { color:#339900; } /* END CSS */ I am not sure if that is what you mean - can you point us at a site that does this?
February 26, 201016 yr It can also be done like this <div id="header"><h2>colour blue</h2></div> <div id="content"><h2>colour red</h2></div> #header h2 { color: blue; } #content h2 { color: red; Also I'm no expert but I think they say, you shouldn't use <h1> tags more than once on a page. Just as I am typing this, I found this <h1> tag is intended to denote the highest level heading on a given web page. It explains what the web page is about, and since a good web page ought to have one purpose, <h1> tag should therefore be used only once on each web page to avoid confusion. This guideline is not in the HTML specification, but has been adopted by all good web developers I have met and worked with so far. It is also a guideline accepted by SEO experts since Google and other search engines treat the <h1> tag with high level of importance. Use <h1> tag on any given page only once and make sure it uniquely entitles what the page is about. For the full article, http://www.flexewebs.com/semantix/semantic-uses-of-h1-h2-h6-html-tags/
February 26, 201016 yr Author Thanks for the replies, I have now seen alot of sites doing it the way j05hr mentions, this is a great read My link I never knew h1 tag should be used only once per page but notice thousands of sites using more than 5 h1 tags on one page so going to look into this more. Thanks Again
Create an account or sign in to comment