Getting Started with CSS Rules
In the HTML section, you created an "index.html" file that contained an image and list. This article explains how to add CSS to that document. You will define styles for the <h1>
, <p>
, and <li>
elements. This example uses embedded CSS rules in an external .css file. This method is efficient for styling several documents.
Introduction
In this article we will take a simple HTML document and apply CSS to it, learning some practical things about the language along the way.
Prerequisites: | Basic computer literacy, basic software installed, basic knowledge of working with files, and HTML basics (study Introduction to HTML.) |
---|---|
Objective: | To understand the basics of linking a CSS document to an HTML file, and be able to do simple text formatting with CSS. |
Source: Mozilla, https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/Getting_started
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.