reading-note

HTML Formatting Elements

Formatting elements were designed to display special types of text:



CSS

allows you to create rules that specify how the content of an element should appear. For example, you can specify that the background of the page is cream, all paragraphs should appear in gray using the Arial typeface, or that all level one headings should be in a blue, italic, Times typeface. Once you have learned how to write a CSS rule, learning CSS mostly involves learning the different properties you can use. ___________

Why Use CSS?

CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.

Three Ways to Insert CSS

There are three ways of inserting a style sheet:

Each HTML page must include a reference to the external style sheet file inside the (link) element, inside the head section.

Internal CSS

An internal style sheet may be used if one single HTML page has a unique style.

Inline CSS

An inline style may be used to apply a unique style for a single element.

To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.