Don’t Fear Starting
From Scratch Part 2: CSS

In the conclusion of this two-part series, we’ll show you how to apply and write your own CSS.

Time to release that long-held breath, here comes part 2 of Starting From Scratch where you'll learn how to add CSS to that hum-drum HTML. Of course, we'll be using our example site as we continue to take it from basic HTML, to a beautiful, well-marked-up website. By the end of this video, you should be able to go forth and start CSS-ing your own website project. What are you waiting for? Press “Play” already!
    • The order doesn’t matter, but generally you want to try to have the tags be in alphabetical order:
      a:active {color:#0000FF;} /* selected link */
      a:hover {color:#FF00FF;} /* mouse over link */
      a:link {color:#FF0000;} /* unvisited link */
      a:visited {color:#00FF00;} /* visited link */

      Also beware that w3schools doesn’t follow the standards all the time, and they misinform sometimes.

    • A clarification about getting link styling to look correct: Alphabetical order isn’t necessarily the best way; by using the order :link, :visited, :hover, and :active, everything should work properly.

      It all has to do with the “cascading” nature of style sheets. “LoVe-HAte,” a cute name to remember the order, works the same way you interact with a link. First, you see (whether it’s new or visited), then hover, then click (or make it “active”).

      Eric Meyer, a good authority on CSS matters, explains in greater detail here: http://meyerweb.com/eric/css/link-specificity.html

  1. OReilly’s book Head First HTML says :The order determines the color used as the link changes from one status to another , but generally you want to try to have the tags be in this order:
    a:link /* unvisited link */
    a:visited /* visited link */
    a:focus
    a:hover /* mouse over link */
    a:active /* selected link */

Leave a Reply

We will only approve comments adding to or clarifying the information above.
Please share other sentiments via twitter or email.
Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>