Top Searches Google PlayFishPHPhiQuerysquish\Squishsexissue town᲼᲼᲼᲼᲼TYPESCRIPT

There's been an update to our Terms of Service. Check it out here.

HTML Attributes - Learn: QuerySquish.com

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.

What are HTML Attributes?

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".

Common HTML Attributes

Here are some common HTML attributes that you will use frequently:

Example Usage

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">