Introducing div and span AH254

Andy 111-1111
Elizabeth 222-2222
Matthew 333-3333

Pseudo-Classes to Style Links

  1. Normal: This is the standard state. With no CSS added, most browsers display unvisited links as blue underlined text.
  2. Visited: This state is enabled when the user visits a link and returns to the current page. Most browsers use a purple underlined style to indicate that a link has been visited.
  3. Hover: The hover state is enabled when the user's mouse is lingering over the element. Most browsers don't use the hover state in their default settings.



This link is normal

This link has been visited

The mouse is hovering over this link


Selecting By Context

This paragraph is left-justified.

This paragraph is left-justified.

This paragraph is left-justified.

The paragraphs in this div are different.

The paragraphs in this div are different.

The paragraphs in this div are different.

#special p { style rule means “Apply this style to any paragraph appearing inside something called special.” You can also define a rule that could apply to an image inside a list item or emphasized items inside a particular class. When you include a list of style selectors without commas, you're indicating a nested style.

If you have multiple elements in a selector rule, it makes a huge difference whether you use commas. If you separate elements with spaces (but no commas), CSS looks for an element nested within another element. If you include commas, CSS applies the rule to all the listed elements.

4 vspaces