Skip to main content

Attributes in Html

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:

  1.   <!DOCTYPE html>
  2.   <html lang="en" dir="ltr">
  3.     <head>
  4.       <title>Attributes in Html</title>
  5.     </head>
  6.     <body>
  7.       <h1 title = "Hello Friends">Title Attribue</h1>
  8.       <img src = "flowers.jpeg" alt = "flowers" width="300" height="300" >
  9.       <img src="" alt="flowers">
  10.       <h1 id = "111">Id attribute in html</h1>
  11.       <a href="https://natarajamurthy.blogspot.com/">blogspot</a>
  12.     </body>
  13.   </html>

Web view of Html:



Here is the Video: