Div Id

This might be the first time you aren’t sure what we’re going to be talking about. Divs are dividers. We’re going to do some more organizing today. The ID is identification that we’ll put on the dividers to make them useful to us as we add CSS and Javascript. We’ll be able to do things like give that part of the page a background color of gray, or if they click the X, hide that part of the page. Things like that we’re able to do with Divs. If you have a section of the page labeled separately, then you can work with it without changing things on the rest of the page.

<html> <head> <title>Dividers</title> </head> <body> <header> <h1>Divs and Ids</h1> </header> <div id ="firstSection"> <p></p> <p></p> </div> <div id ="links"> <a href="http://learning-with-lee.com">Come learn with Lee!</a> </div> <footer> <p>Thanks for joining me!</p> <p>Come back soon!</p> </footer> </body> </html>

Watch the lesson on Youtube to see what this looks like on a webpage.