Elements and Attributes: Defined

Example: <p>This is my paragraph. It consists of two sentences.</p>
  • every element has two tags an opening and a closing tag
  • tags are enclosed with < and >
  • a closing element looks the same as the opening element, except it has a slash in front of it.
  • properly nested
Attributes: <p n="1">This is my paragraph. It consists of three sentences. The opening tag has an attribute which further defines this as paragraph 1.</p>
  • further defines an element.
  • occurs in two parts: name and value
  • attributes only appear in the first tag of an element