---
title: "Discussion on \"Understanding HTMLCollection and NodeList in JavaScript \" | Hashnode"
description: "Discussion on \"Understanding HTMLCollection and NodeList in JavaScript \". 1. HTMLCollection\nAn HTMLCollection is a collection of HTML elements.\nHow to get HTMLCollection\ndocument.getElementsByClassName(\"item\");\ndocument.getElementsByTagName(\"li\");\ndocument.getElementById(\"l"
url: "https://hashnode.com/posts/understanding-htmlcollection-and-nodelist-in-javascript/69ba289bc22d3eeb8a2ef504"
---

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

Discussion

# [Understanding HTMLCollection and NodeList in JavaScript](https://htmlcollectionvsnodelist.hashnode.dev/understanding-htmlcollection-and-nodelist-in-javascript?utm_source=hashnode&utm_medium=feed)

1\. HTMLCollection An HTMLCollection is a collection of HTML elements. How to get HTMLCollection document.getElementsByClassName("item"); document.getElementsByTagName("li"); document.getElementById("l

Mar 18 · 2 min read · htmlcollectionvsnodelist.hashnode.dev  
Read the article

-   [#hiteshchaudhary](https://hashnode.com/tag/hiteshchaudhary)
-   [#chaiaurcode](https://hashnode.com/tag/chaiaurcode)
-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#dom](https://hashnode.com/tag/dom)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#piyushgarg](https://hashnode.com/tag/piyushgarg)
-   [#cohort2026](https://hashnode.com/tag/cohort2026)

## Written by

[Raj Singh](https://hashnode.com/@rajsingh2335)

@rajsingh2335

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
