-
Fork and clone this repository locally and in Visual Studio Code
-
Push up your changes to the remote repository
-
Create an HTML file called
js-dom.html- Must have global HTML document structure
-
Add two
<p>elements without content. -
Give each
<p>element anidand value -
Stage, commit, and push changes. Let Git be on your team.
-
Create scripts for each exercise:
-
Write a script to add "We are coders!" to the
<p>element. -
Find the first
<p>element and change its text to "Developers for life!" -
Add an image to the HTML document using DOM methods
Stage, commit, and push changes. Let Git be on your team.
-
Write a script to change the color of the text from black to your favorite color
-
Add a script to change the font size of the first
<p>element to40pxStage, commit, and push changes. Let Git be on your team.
-
Add a button to the HTML document
-
Add a script that hides the image when the button is clicked
Stage, commit, and push changes. Let Git be on your team.
-
-
Create an HTML file called
about.html- Must have global HTML document structure
-
Stage, commit, and push changes. Let Git be on your team.
-
Create a simple "About Me" webpage and using JS and the DOM to manipulate elements.
-
Title your webpage About Me and add this code
<ul>
<li>Nickname: booboo</li>
<li>Favorites: music, pizza, The Office</li>
<li>Hometown: Wilmington </li>
<li>Random Fact: Black is my favorite color.</li>
</ul>-
Stage, commit, and push changes. Let Git be on your team.
-
Nest those values within a
spanelement and give each anid -
Create a JS file named
main.jsand link to the HTML document -
Stage, commit, and push changes. Let Git be on your team.
-
Complete the following tasks below using the DOM methods:
-
Change the body style so it has a
font-familyofArial, sans-serif. -
Replace each of the values with your own information.
Stage, commit, and push changes. Let Git be on your team.
-
Change the
<li>style to a color of your choosing. Cannot be black.Stage, commit, and push changes. Let Git be on your team.
-
Find a picture and add to the project.
-
Create a new
imgelement and set itssrcattribute to a picture of you. Append the image to the web page.Stage, commit, and push changes. Let Git be on your team.
-
Using the great power of the DOM and its methods, iterate through the elements in the HTML document and create a Table of Contents that will be at the top of the webpage.
- Create a new HTML file and add the code below.
<body>
<div >
<h3>Table of Contents</h3>
</div>
<hr/>
<div >
<h1>Fruits</h1>
<h2>Red Fruits</h2>
<h3>Apple</h3>
<h3>Raspberry</h3>
<h2>Orange Fruits</h2>
<h3>Orange</h3>
<h3>Tangerine</h3>
<h1>Vegetables</h1>
<h2>Vegetables Which Are Actually Fruits</h2>
<h3>Tomato</h3>
<h3>Eggplant</h3>
</div>
</body>-
Stage, commit, and push changes. Let Git be on your team.
-
Add a script to the HTML document that iterates through the elements and creates a table of contents. The table of contents should be at the top of the webpage.
-
Stage, commit, and push changes. Let Git be on your team.
