HTML Attributes
In the previous lesson, we explored some advanced HTML elements. Now, let's learn about HTML attributes and how to use them to enhance your HTML elements.
HTML attributes provide additional information about HTML elements. They are always included in the opening tag and usually come in name/value pairs like this: name="value".
Here are some common HTML attributes that you will use frequently:
Let's see how to use some of these attributes in an HTML document:
<h1 class="main-heading">This is a Heading</h1>
<p id="intro">This is a paragraph.</p>
<a href="https://www.example.com">This is a link</a>
<img src="image.jpg" alt="Description of image">