What is an HTML Attribute?
An HTML attribute provides additional information about an HTML element. It is always written inside the opening tag.
Example:
Content
Example:
Google
href Attribute name
https://www.google.com → Attribute value
The HTML standard has 100+ attributes, and browsers continue to support additional global, element-specific, and newer attributes as HTML evolves.
they are called common HTML attributes?
- id
- class
- href
- src
- alt
- title
- style
- type
- value
- placeholder
- name
- disabled
- required
- checked
- readonly
- maxlength
- pattern
Common HTML Attributes
Types of Attributes
- Global Attributes
- id
- class
- style
- title
- hidden
- Element-Specific Attributes
- href (for )
- src (for
)
- alt (for
)
- type (for )
- value
- Boolean Attributes
- required
- checked
- disabled
- readonly
- autofocus

Top comments (0)