Attributes | HTML: Attributes are using to make elements more reliable and usable.
Syntax: <element attribute_name="attribute_value">content</element>
List of few Attributes:
1. lang Attribute
2. dir Attribute
3. title Attribute
4. src Attribute
5. alt Attribute
6. width and height Attributes
7. id Attribute
8. href Attribute
Here is the Attributes.html:
- <!DOCTYPE html>
- <html lang="en" dir="ltr">
- <head>
- <title>Attributes in Html</title>
- </head>
- <body>
- <h1 title = "Hello Friends">Title Attribue</h1>
- <img src = "flowers.jpeg" alt = "flowers" width="300" height="300" >
- <img src="" alt="flowers">
- <h1 id = "111">Id attribute in html</h1>
- <a href="https://natarajamurthy.blogspot.com/">blogspot</a>
- </body>
- </html>
Web view of Html:
Here is the Video: