HTML · HTML Tutorial · Lesson 13
HTML CSS
Inline, internal and external CSS.
CSS (Cascading Style Sheets) formats the layout of a web page. CSS can be added to HTML in three ways:
- Inline — the
styleattribute on an element - Internal — a
<style>element in the<head> - External — a
<link>to an external .css file
Internal CSS
Example
<!DOCTYPE html>
<html>
<head>
<style>
body { background-color: powderblue; }
h1 { color: blue; }
p { color: red; }
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Keep reading “HTML CSS”
Sign up to read the full lesson (5 more parts), try every example in the live editor, and take the 5-question quiz.