Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Ali Sh2,026 Points
what does <h2> and </h2> stand for?
when should i use them and what is the difference between them
Jennifer NordellTreehouse Teacher
Hi there! The
</h2> are HTML elements representing "headlines". The 2 indicates the importance. These go in order from 1 down to 6. The
<h1> is the most important and the
<h6> is the least important.
<h2> is the beginning tag and the
</h2> is the closing tag. Any text that appears between them will be classified as a headline and styled with any stylings given to h2 elements (either by custom CSS or the user agent sheet).
Here's an example of the HTML for an h2 element:
<h2>I'm a level 2 headline!</h2>
Hope this helps!