Learn HTML For Beginners

What is Attribute

HTML elements can have attributes. An HTML attribute is a modifier of an HTML element. Attributes provide additional information about an element. HTML attributes generally appear as name-value pairs, separated by "=", and are written within the start tag of an element, after the element's name:

<tag attribute="value"> (content to be modified by the tag) </tag>

Where tag names the HTML element, attribute is the name of the attribute, set to the provided value.

The value may be enclosed in single or double quotes, although values consisting of certain characters can be left unquoted in HTML. Leaving attribute values unquoted is considered unsafe.


HTML links are defined with the <a> tag. The link address is specified in the href attribute:

<a href="http://www.brainysolutions.org ">this is a link</a>