Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

External CSS

An external stylesheet is used to maintain consistent styling across multiple HTML documents by linking it in the <head> section of each document.

Example

<!DOCTYPE html>
<html>
<head>
  <link rel=”stylesheet” href=”styles.css”>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Create an external stylesheet using a text editor, saving it with a “.css” extension and containing only CSS code. Here’s an example of a “styles.css” file:

“styles.css”:

body {
  background-color: powderblue;
}
h1 {
  color: blue;
}
{
  color: red;
}

 

Click to Learn