CSS IDs are similar to classes, except once a specific id has been declared it cannot be used again within the same (X)HTML file.
IDs are generally used to style the layout elements of a page that will only be needed once, ie. header, footer and container.
For example,
<div id=”container”>
Everything within the page is inside this division.
</div>
Then in the CSS file, we will have the following:
<div id=”container”>
Everything within the page is inside this division.
</div>
Note, the ID selector begins with a (#) number sign instead of a (.) period, as the class selector does.