by Jim Gordley
We learned erlier that we can create a specific ID to a CSS slector. In this section we will learn how to apply a specific ID to an HTML element
Assuming an internal or external css ID selector has been created (the hash mark (#) is used to create an id selector.)
Applying the CSS id selector to an HTML element is done by using the id attribute in the HTML element
Take a moment to view the source code for this page. Notice in the head section there is an internal style sheet with an id selector. Then scroll down and see how that id is being applied.
|DO THIS||WHY YOU DO IT||
||So you can edit the content.
Assigns the id selector named nav to the html element <div>
|The <div id="nav"> is a division tag that contains links to other pages on our web site. That division now has an orange background (ff9933). This style only applies to elements that have the atrribute id with a value of nav.|