Key Points

  • Styles can define the formatting for specific instances of a tag, for all uses of a tag within a document, or for all uses of a tag within a group of documents.

  • A cascading style sheet is a list of style rules applied to tags within an HTML document. This list can either be internal (embedded) or external to the document.

  • There are three ways to apply a style. You can use the style= argument within an individual tag, you can create an embedded style sheet, or you can create an external style sheet.

  • An embedded style sheet is placed in the <head> section of the file, and enclosed in a <style> tag. An external style sheet is a separate plain text file with a .css extension.

  • A style sheet consists of one or more style rules. A style rule is ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.