Welcome to the Treehouse Community
Looking to learn something new?
In this example, there are two <h1> tags on the same page...is this not bad practice? (I know it is just an example, but is this ever a legitimate practice?)
It all depends if you are using HTML5 or not. If you are using the HTML5 section element, then each section can have its own h1. You can also have multiple header and footer elements on the page.
Take a look at the article on the w3c website - http://www.w3.org/html/wg/drafts/html/master/sections.html#outlines
Also there is an article on developer.mozilla.org that shows the difference between the structure of a HTML 4 document and how the HTML5 Outline Algorithm works.
Derek Etnyre20,822 Points
You are correct - having a single <H1> tag on a form is good form. It helps search engines know what the main topic of a web page is. This is an interesting article on the subject: http://webdesign.tutsplus.com/articles/the-truth-about-multiple-h1-tags-in-the-html5-era--webdesign-16824
Bad practice according to what standards? I recommend the following:
1) Validate your HTML according to http://validator.w3.org
2) In terms of SEO (Search Engine Optimization) just don't try to be a smartass. If you think your code makes sense to a normal human user just do it. If you are trying to deceive Search Engines such as Google you will get in trouble very soon.
In my opinion you should try to use tags for what they stand for.
<h1> would be recommended for titles, or for example, if you have an article with several main topics and subtopics I think it would also be acceptable to use
<h1> with some
<h3>. If you use a headline tag to your content it would be wrong for example.
Derek - the article you reference is really helpful...thanks