Div ID

Now let's look at div id, which is similar to div class, except it is only used once in a document. Div id's are good for things like titles and footers. In fact, let's create a div id for the special "Thanks" section at the very end of the document.

Creating a div id is slightly different because the selector needs to be preceded with a hash mark:

#div-name {property: value;}

So, let's make a div id with the name "thanks" and set the font-style to italic.

<style type="text/css">
<!--
body {background-color: #cccccc; color:#FFFF33; font-family: Trebuchet MS, Verdana, Arial, sans-serif; margin-top: 20px; margin-left: 10%; margin-right: 10%; font-size:100.1%;}
h1 {font-size:2em; color:#FFFFFF; font-family: Verdana, Arial, sans-sefif; text-align: center; text-transform: capitalize; font-weight:normal;}
p {font-size: 1em; color: #000000; text-align: justify; line-height: 1.2;}
p:first-letter {color: inherit; font-size: 2em; font-weight: 100;}
.notes {font-size: .8em;}
.footnote {font-size: .6em; vertical-align: text-top;}
.breaks {font-size:2em; color:#FF6600; font-family:Arial, Helvetica, sans-serif; text-transform:uppercase;}
#thanks {font-style:italic}
-->
</style>

Now let's wrap that div id around the thanks section at the end of the document. The basic synatax for calling the div id tag is:

<div id="dividname">content to be effected by the div</div>

Notice that in the body HTML, the hash is NOT included in the div id name! Ok, let's wrap that thanks tag around the final section of the document. Remember to replace the paragraph tags with the opening div id and the closing div! When you finish, the last section will look like the example below. Notice that the color is inherited from the body style:

That's it for now! You are familiar with class, span class, div class, and div id!