-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoneDom.html
36 lines (33 loc) · 1.06 KB
/
oneDom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dom learning</title>
<style>
.bg-black{
background-color: #212121;
color: #fff;
}
</style>
</head>
<body class="bg-black">
<div >
<h1 id="title" class="heading">DOM learning on chaii or code <span>now testing<span>
</h1>
<h2>Lorem, ipsum dolor.</h2>
<h2>hi i am h2</h2>
<h2>hii i am h2 once more</h2>
<h2>hii i am h2 onece more more</h2>
<p>Lorem ipsum dolor sit amet.</p>
<input type="password">
<ul>
<li class="listitem" value="list1">one</li>
<li class="listitem" value="list2">two</li>
<li class="listitem" value="list3">three</li>
<li class="listitem" value="list4">four</li>
</ul>
</div>
</body>
</html>
<!-- innerText=It gives only the values that is visible to us
textContent=It not only gives the visible values but also gives all the invisible values
innerHTML: innerHtml returns all text, including html tags, that is contained by an element. -->