ID Selector Demonstration

Here is part of this document's style sheet:
#part1 a {color: green; font-weight: bold; font-family: Arial, sans-serif;}

#part2 a {color: gray; font-size: 125%; font-family: serif;}
<div id="part1">

Our class's home page: Universe

UVU's home page: UVU


<div id="part2">

Our class's home page: Universe

UVU's home page: UVU

Notice that the a elements in part1 use a different style than the ones in part2. Also notice that the styles only apply to the a elements, and not other kinds of text in the div.


Here are copies of the links that are not in a div, to emphasize that the styles apply only to elements inside the element with the selected ID.

Our class's home page: Universe

UVU's home page: UVU