HTML element is composed of HTML elements that encapsulate the content within opening and closing tags.
Syntax
Most HTML elements are written by start tag <>
and end tag </>
. For example, a header can be represented as:
There are three types of elements: normal, raw text, void.
- Normal elements: start tag with number of HTML attributes, its content and end tag.
- Raw text elements: start tag with number of HTML attributes, its content contains raw text (not tag/element), end tag.
- Void elements: only have start tag with attributes.