Mark As Completed Discussion

Basics of HTML

As mentioned earlier, HTML consists of various elements that define the structure and content of the page. Each of these elements has a specific purpose. For example, all the content of the web page must be enclosed within the <body> element. All element content is also enclosed within tags, which are angle brackets <> surrounding the element name.

Tags and Attributes

Tags mostly occur in pairs, with an opening and a closing tag. Opening tag consists of the element name enclosed in angle brackets and indicates the beginning of the element. For example, <p>, for paragraph element. Closing tag consists of the element name and a forward slash enclosed in angle brackets. For example, </p>, which closes the paragraph element.

Basics of HTML

Attributes are properties of HTML elements that provide additional information. They are defined after the element name in the opening tag. The attribute name is followed by an equals sign, to which the attribute value is assigned in quotation marks. For example, the id attribute allows assigning a unique identifier to an HTML element as follows.

Basics of HTML