How HTML Describes the Structure of Pages:

With HTML, a browser’s processor identifies elements of the document by looking for tags embedded directly in the text. These elements are then parsed into the Document Object Model (DOM).

Review of Elements and Tags

Remember? An HTML document is composed of a tree of HTML elements. An element is an individual component of an HTML document. Elements denote to the processor structure and semantic meaning of the document. Elements may also be nested or encapsulated within other elements. Elements are identified through tags.

HTML
 <p>This is a paragraph element, made with "<p>" tags.</p>

New! Attributes

Attributes provide additional information about an HTML element. This may include information such as languages (US-English vs. French), URL links for text, the size to display a picture, or ways of identifying specific elements.

Attributes are always placed inside the opening tag for the element they refer to. Attributes are always provided in a key=“value” pair. The key is an identifier the the browser processor will recognize. These keys are defined by the W3 Consortium that defined HTML5 specification. The value provides information about the attribute.

The value is always surrounded by double quotations. One reason for this is that it allows for spaces to be used within the value for an attribute. Furthermore, the attribute will have one space placed between the tag label and the attribute, as well as between any subsequent attributes.

HTML
<p lang="en-us">This is a paragraph element, made with "<p>" tags.<br/>
It is written in US-style English.</p>

{ TODO: }

  1. Read pages 23-26 of Chapter 01 in Duckett.
  2. If you need a refresher, please review the Elements and Tags pages of Topic-03.

Previous section:
Next section: