Exercise 23
- Create the following folder/file structure:
/ex_23
|-- index.html
index.html
- Create a basic HTML document
- Create a script tag on the document head element
- Add the following html code
<!DOCTYPE html>
<html lang="en">
<head>
<title>Texts</title>
</head>
<body>
<h1>Main Title</h1>
<p>This is a paragraph</p>
<ul></ul>
</body>
</html>
- Select the ul element
- Assign the following html string
'
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
'
- Show the ul element children using both children and innerHTML properties
Extra
- Try to create something with all the things that we learned so far! :)