---
title: "Discussion on \"When to use the id attribute\" | Hashnode"
description: "Discussion on \"When to use the id attribute\". The id attribute is arguably one of the most popular attributes used in HTML, second only to the class attribute. It serves a lot of purposes, which means it can easily be misunderstood or misused. Let's take a look at what it's really for, what it's..."
url: "https://hashnode.com/posts/when-to-use-the-id-attribute/63ed4ed7a99ffe7f560c48f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [When to use the id attribute](https://webdev.tips/when-to-use-the-id-attribute?utm_source=hashnode&utm_medium=feed)

The id attribute is arguably one of the most popular attributes used in HTML, second only to the class attribute. It serves a lot of purposes, which means it can easily be misunderstood or misused. Let's take a look at what it's really for, what it's...

Feb 15, 2023 · 8 min read · webdev.tips  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#html](https://hashnode.com/tag/html)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Joel Saupe](https://hashnode.com/@joelsaupe)

@joelsaupe

  
[View profile](https://hashnode.com/@joelsaupe)

Software engineer

Software engineer with 10 years of experience working on frontend applications and tooling to make frontend development easier.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
