How to create an external CSS styling sheet

For HTML, it is generally easier to create a styling sheet apart from the actual code. This keeps the source material simple and can be more efficient when dealing with many similarly-formatted pages.

Within the <head> area of an HTML page, the code: <link rel=”stylesheet” href=”name.css” /> will apply an external CSS styling sheet (entitled “name.css”) to the HTML page.

The CSS style sheet operates simply by defining each HTML section (for example, <p>), and then having different style codes in between curly brackets.

The CSS code below, for example, will make the background color for the <p> section green:






~ by johnmcala on January 31, 2011.

%d bloggers like this: