HTML and CSS Reference
Figure 2-5. Selecting HTML elements based on ID, tag name, and CSS class
Notice how all the <div> elements have the same background color because the color was applied to
the background-color attribute for all HTML elements with tag name div . Similarly, both <div> elements
with the CSS class MyClass have the same text content.
Now, let's develop a more meaningful example based on this knowledge. Figure 2-6 shows a GridView
server control populated with data from the Employees table of the Northwind database.
Figure 2-6. GridView with alternate rows displayed with different styles