what is HTML Attributes and how to define?

 HTML Attributes


  ●         All HTML elements can have attributes

         Attributes provide additional information about elements

         Attributes are always specified in the start tag

         Attributes usually come in name/value pairs like: name="value"

html attribute in p tag example



The href Attribute


The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:

Example

<a href="https://www.amzon.com">Visit amzon</a>



example:


<html>


<head>

<title>a href attribute</title>

</head>


<body>

<a href="www.amezon.com">visit amezon</a>

</body>


</html>



output




Post a Comment

0 Comments