Module 2 Resources

Welcome to Module 2! We will learn how to change the appearance of web pages using CSS. You are certainly aware of updating formatting of a Word document or a PowerPoint presentation. We can do the same with our web pages

There are different ways to apply CSS to your web pages:

  1. Inline Styles
  2. Internal Stylesheet
  3. External Stylesheet

In this module, we will focus on the Internal Stylesheet. We will learn how to use style within the head tag.

Heading 2

Let's change the appearance of a heading using CSS. In this file, we declare the style within the head tag for H1. We have decided to center the heading. We did this by adding the following code to the head tag:

        h1 {
            text-align: center;
        }
    

Compare the first heading with the second heading: The first heading is centered, while the second heading is left-aligned. Look at the source code of this page to see how this change was applied.

Now, the heading is centered on the page. We can also change the color of the text, the font, and more. We will learn how to do that in the next few lessons.

Let's see how we can use CSS Examples to practice CSS!