HTML ATTRIBUTE

Fazzey's world

HTML Attribute

  • Additional information about the elements is provided by attribute.
  • All HTML components are capable of having attributes.
  • Typically, attribute are expressed as name=value pairs.

The parts of html attribute:

  1. A name and a value make up an attribute. The HTML element is <element>. The attribute names are name1 and name2.
  2. An element's attribute provide it more capabilities or functionality.
  3. In the opening tag of the element, attributes are inserted.
  4. Any amount of characteristics can be applied to an element.

Syntax:

The href attribute;
<a href="https://www.gocourse.in/">Click GOCOURSE</a>

Example:


  
  <!DOCTYPE html>
  <html>
  <head>
  <title>HTML Attribute</title>
  </head>
  <body>
  <h1>HTML programming language</h1>
  <p>To visit our "Gocourse" website:<p>
  <a href="https://www.gocourse.in/">Click GOCOURSE</a>
  </body>
  </html>


Output:


Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send