Attributes define additional
properties of an element.
Certain parameters are frequently included within
the opening tag to provide additional element properties (such as
colorization, measurement, location, alignment, or other appearances)
to the data between the markup tags. These parameters are called
always specified in the start tag (or opening tag), and they can only
contain the value of the attribute.
Most attributes require a value. In HTML, the value
can be left unquoted if it doesn't include spaces
name=value), or it can be quoted with single or double
the way, it is recommended to enclose Attribute values in quotes.
For example, the
abbr element, which
represents an abbreviation, expects a
with its expansion. This would be written as:
<abbr title="Hyper Text
Tip:In some rare
situations, when the attribute value itself contains quotes, it is
necessary to wrap attribute value inside single quotes: name='John
In the example below
href is attribute
and the link provided is its value.
HTML links are defined with the
tag. You will learn about links in upcoming tutorials.
are generally case-insensitive, except certain attribute values, like
class attributes. However, World
Wide Web Consortium (W3C) recommends lowercase for attributes values
in their specification.
A complete list of attributes for each HTML element
is listed inside: HTML Tag Reference.