How to handle JavaScript DOM elements - Web Development
3 Views

How to handle JavaScript DOM elements

How to manipulate HTML elements using javascript code

First we have to find html elements.To achieve this we have several ways

Find html element by id , Find html element by class name ,Find html element by css selectors , Find html element by tag.

Work with html element id

By using element id we can find elements in the DOM.

Output of code

Get element by id


I am javascript

How to find HTML element by tag

Tag means like div tag , p tag and other different tags in the html. Now we will target these tags using javascript code.

Output of code

Element by tag


I am javascript

Jquery is a library of javascript

Leave a Reply

Your email address will not be published. Required fields are marked *