HTML Styles - CSS
CSS = Styles and Colors
Manipulate Text
Colors,
Boxes
Styling HTML with CSS
CSS stands for Cascading Style Sheets
Styling can be added to HTML elements in 3 ways:
Inline - using a style attribute in HTML elements
Internal - using a
External - using one or more external CSS files
The most common way to add styling, is to keep the styles in separate CSS
files. But, in this tutorial, we use internal styling, because it is easier to
demonstrate, and easier for you to try it yourself.
You can learn much more about CSS in our CSS Tutorial.
Inline Styling (Inline CSS)
Inline styling is used to apply a unique style to a single HTML element:
Inline styling uses the style attribute.
This example changes the text color of the
element to blue:
Example
This is a Blue Heading
Try it Yourself »
Internal Styling (Internal CSS)
Internal styling is used to define a style for one HTML page.
Internal styling is defined in the
section of an HTML page,within a
Example
body {background-color:lightgrey;}
h1 {color:blue;}
p {color:green;}
This is a
heading
This is a paragraph.