-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdom-practice.html
More file actions
29 lines (26 loc) · 1.09 KB
/
dom-practice.html
File metadata and controls
29 lines (26 loc) · 1.09 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>Welcome to the hunger games </h1>
<h4>may the odds be ever in your favor </h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet animi blanditiis dolor ducimus eaque eveniet exercitationem fugiat hic iure iusto nam nihil quidem, soluta suscipit tempore totam unde veniam.</p>
<ul>
</ul>
<p>jasdlfkgnkl aksdflkan kajsdgknm asodjgf knsakdnf k alskdfg lorem</p>
<script>
//change the color of the h1
let mainHeader = document.getElementsByTagName('h1')
mainHeader[0].setAttribute('style','color:gold' )
//Change the 2nd paragraph to 'high impact drama says rolling stones' change the color and make it a quote
let newPara = document.getElementsByTagName('p')
newPara[1].innerHTML= '<h2 style="color: #4477c2"> <q>high impact drama</q></h2> - says rolling stones'
//change the words in the h4 to be capitalized and change the color of the first word but not the rest
// let newPrhas = document.getElementsByTagName("h4")
// if
</script>
</body>
</html>