Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRafic Jouejati
14,976 PointsWhy is it necessary to add a class to the header? Can just style header tag
Why is it necessary to add a class to the header? you can omit the class and just target the header tag in css so wondering why you added a class to it? Thanks
3 Answers
walter palma
3,189 PointsYou can, but you can have more than one header and you probably dont want every header with the same style :)
Matt WebDev218
Front End Web Development Techdegree Graduate 18,099 PointsYou want the header to be 100% width, but all the content of the header to be inline with main content of the page. That way the headers background styling extends the full width of the screen.
Jonathan Guerrero
Front End Web Development Techdegree Graduate 18,245 Pointsis it possible to have multiple headers? is that the reason why we use a div to contain the header elements?