HTML attribute

HTML attributes are special words used inside the opening tag to control the element's behaviour. It is a piece of markup language used to adjust the behavior or display of an HTML element.HTML attributes are a modifier of a HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to a HTML start tag.

Several basic attributes types have been recognized, including: (1) required attributes needed by a particular element type for that element type to function correctly; (2) optional attributes used to modify the default functionality of an element type; (3) standard attributes supported by many element types; and (4) event attributes used to cause element types to specify scripts to be run under specific circumstances.

Doctype HTML is a declaration that tells the browser what version of HTML the document is written in.

Some attribute types function differently when used to modify different element types. For example, the attribute name is used by several element types, but has slightly different functions in each.[1]

  1. ^ "Index of the HTML 4 Attributes". W3C. Retrieved 13 February 2015.

Developed by StudentB