DOM in Javascript - how to get/set all ID, CLASS and TAGS (full information with working code)
DOM in Javascript - how to get ID, CLASS and TAGS (full information with working code) /*This is the simple HTML and Javascript Code we will use */ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Test Page</title> </head> <body> <div class="wrapper"> <div id="header"> <h1 class="header-tag" style="text-align:center; color:red;">THIS IS A SAMPLE SITE</h1> <div id="main"> <ul> <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facilis molestias enim adipisci nisi, aut official.HELLO</li> ...