HTML Elements
Published by: Anil K. Panta
HTML documents are defined by HTML elements. An HTML element is everything from the start tag to the end tag. For example,
An HTML element consists of start tag, end tag, and element content. The element content is everything between the start tag and end tag. Empty elements are closed in the start tag. Most HTML elements can have attributes. For example, src attribute of img tag.
HTML Attributes
Attributes provide additional information about HTML elements. Attributes are always specified in the start tag. Attributes come in name/value pair like name = “value”. For example, HTML links are defined with <a> tag and the link address is provided as an attribute href like
Note: Always quote attribute values and use lowercase attributes.