English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual Básico de HTML

HTML Media

HTML Reference Manual

HTML5 Manual Básico

HTML5 API

HTML5 Media

Atributos HTML

Attributes are additional information provided by HTML elements, such as width, height, style, etc.

Atributos HTML

  • HTML elements can set attributes

  • Attributes can add additional information to the element

  • Attributes are generally described in the start tag

  • Attributes are always named/Value pairs appear in the form, such as: target="_blank".

Attribute example

HTML hyperlinks are defined by the <a> tag, and the address of the hyperlink is specified in the href attribute:

<a href="https://pt.oldtoolbag.com">This is a hyperlink</a>
Test and see ‹/›

Commonly used HTML attribute values

The attribute value should always be enclosed in quotes.

Double quotes are the most commonly used, but it is also fine to use single quotes.

Tip: In some individual cases, such as attribute values containing double quotes themselves, you must use single quotes, for example: name=&39;John "ShotGun" Nelson&39;

HTML Tip: Use lowercase attributes

Attributes and attribute values.

However, the World Wide Web Consortium is not sensitive to the case of HTML 4 Recommended in the standard/Attribute value.

While the new version of (X)HTML requires the use of lowercase attributes.

Suggestion: Use lowercase tags consistently

HTML Attribute Reference Manual

View the complete list of HTML attributes:HTML Tag Reference Manual.

The following lists the attributes applicable to most HTML elements:

AttributeDescription
classDefine one or more class names (class name from style sheet)
idDefine the unique id of the element
styleDefine the inline style of the element
titleInformações adicionais sobre o elemento (usado como barra de ferramentas)

Mais informações sobre atributos de padrão:Manual de Referência de Atributos de Standard HTML.