-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiwrite.html
More file actions
24 lines (19 loc) · 688 Bytes
/
iwrite.html
File metadata and controls
24 lines (19 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<h1 id = "heading">Top 3 Cities</h1>
<ol id = "list">
<li>Tokyo, Japan
<li>New York, USA
<li> Rio de Janeiro, Brazil
</ol>
<script>
(function(){
const itemFour = document.createElement( 'li' )
const itemFive = document.createElement( 'li' )
const heading = document.getElementById( 'heading' )
itemFour.innerText = 'London, England'
itemFive.innerText = 'Cape Town, South Africa'
document.getElementById('list').appendChild( itemFour )
document.getElementById( 'list' ).appendChild( itemFive )
heading.setAttribute('style' , 'color:Red')
heading.innerText = 'Best Five Cities'
})()
</script>