Articles

  1. Learn HTML and CSS: An Absolute Beginner’s Guide Article

    Class Selectors To date, we’ve discussed the ways in which we can style various elements, such as paragraphs and headings; we’ve also seen how we can style elements in specific areas of the page using the id attribute. However, implementing broad-brush styles, such as coloring the text in all p elements navy, is very much […]

  2. Learn HTML and CSS: An Absolute Beginner’s Guide Article

    Which Rule Wins? When we added the grouped declaration for the headings, we changed some styles that we’d set previously. A look at the source shows that the level two heading, h2, has been set to be blue and white in different places in our style sheet: h2 {             […]

  3. Learn HTML and CSS: An Absolute Beginner’s Guide Article

    Looking at Elements in Context Here’s a riddle for you: which of these items is bigger? A pen or a sheep? Well, the answer is either, depending on the context. If you were a farmer, you’d swear that the pen is bigger. After all, you spend many hours a week rounding up herds of sheep […]

  4. Learn HTML and CSS: An Absolute Beginner’s Guide Article

    A Beginner’s Palette of Styling Options We’ve looked at some examples of styles that can be applied to your web pages through CSS, but the examples we’ve seen have been a mixed bag (and deliberately so). There are so many more from which you can pick and choose — too many possibilities, in fact, for […]

  5. Learn HTML and CSS: An Absolute Beginner’s Guide

    A Mixture of New Styles Let’s change the look of the site a little more — we’ll add more styles to the body, and change the look of the navigation. Copy the CSS below into your style1.css file (or copy it from the book’s code archive): /*               CSS […]

  6. Learn HTML and CSS: An Absolute Beginner’s Guide

    Starting to Build Our Style Sheet The style sheet is ready to be used: it’s saved in the right location, and all of your web pages (all three — count ‘em) are linked to it correctly. All we need to do is set some styles. One of the first changes that people often make to […]

  7. Learn HTML and CSS: An Absolute Beginner’s Guide

    External Style Sheets Why External Style Sheets Are Better than Embedded Styles An external style sheet provides a location in which you can place styles that can be applied on all of your web pages. This is where the true power of CSS lies, and it’s for this reason that we haven’t spent too much […]

  8. Learn HTML and CSS: An Absolute Beginner’s Guide

    Adding Inline Styles Open about.html in your text editor, and add an inline style. We want to make the text in the first paragraph after the “About Us” heading bold and blue. Refer to the previous example as you create the style. Does the markup for your paragraph look like this? <p style="color: blue; font-weight: […]

  9. Learn HTML and CSS: An Absolute Beginner’s Guide

    Chapter 3. Adding Some Style Earlier in this article, we stepped through the process of setting up your computer so that we could develop web sites, and pulled together the beginnings of a web site with which you could impress your friends and family. The trouble is, when you came to show off your fledgling […]

  10. Learn HTML and CSS: An Absolute Beginner’s Guide

    Splitting Up the Page We’ve been making good progress on our fictitious site … but is a web site really a web site when it contains only one page? Just as the question, “Can you have a sentence with just one word?” can be answered with a one-word sentence (“Yes”), so too can the question […]