Skip to content

smith713/lswebhomework4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

JavaScript and the DOM

  1. Create an HTML file using the following HTML
<!doctype HTML>
<html>
<body>

<h1>About Me</h1>
  
<ul>
	<li>Nickname: <span id="nickname"></span>
	<li>Favorites:  <span id="favorites"></span>
	<li>Hometown: <span id="hometown"></span>
</ul> 

</body>
</html> 

  1. Link it to a JavaScript file that you will edit

Using the JavaScript file only (not using a CSS file)

  1. Change the background color of the entire document to red
  2. Change the background color of just the "about me" portion to blue
  3. Change the font-style of the entire document to sans-serif
  4. Add your nickname
  5. Add your favorites
  6. Add your hometown

Extra Credit (still only using JavaScript)

  1. Iterate through each li and change the class to "listitem". Add a style tag that sets a rule for "listitem" to make the color red.
  2. Create a new img element and set its src attribute to a picture of you. Append that element to the page.

About

JavaScript and the DOM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.4%
  • HTML 28.6%