← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 606 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  2. 2.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i < 6; i++) {
      console.log("Welcome");
    }
  3. 3.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  4. 4.Which of these is true of a web browser? (a) answers page requests (b) has an address bar (c) stores a website’s files (d) colours code to help us
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  6. 6.♿ Which link text is clearest? (a) here (b) click here (c) Read the fruit facts (d) link
  7. 7.🚀 What is the home page file of a website usually called? (a) start.js (b) home.css (c) main.png (d) index.html
  8. 8.True or false: <aside> helps you move around. (a) True (b) False
  9. 9.⚖️ What colour is the text of this element?
    <h2 class="star" id="end">Hi</h2>
    CSS:
    h2 { color: green; }
    #end { color: black; }
    (a) black (b) yellow (c) white (d) green
  10. 10.🌍 Which program shows a web page to us? (a) a music player (b) a calculator (c) a paint program (d) a web browser
  11. 11.Which of these is a closing tag? (a) <b> (b) <title> (c) <p> (d) </title>
  12. 12.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 140px;
      padding: 25px;
      border: 3px solid black;
      margin: 10px;
    }
  13. 13.🌍 Which one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  15. 15.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) width (c) A tiger asleep (d) A red kite
  17. 17.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 4;
    console.log(x + y);
    (a) 6 (b) 24 (c) Error
  18. 18.⚡ What number does this code print?
    let runs = 13;
    runs = runs + 4;
    runs = runs - 9;
    console.log(runs);
  19. 19.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  20. 20.True or false: “write clear link text” helps everyone use the page. (a) False (b) True
  21. 21.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.📱 max-width: 600px applies when the screen is ___. (a) 600px or narrower (b) 600px or wider (c) turned off (d) exactly 1000px
  23. 23.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  24. 24.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  25. 25.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.Which of these is an empty tag? (a) <b> (b) <p> (c) <img> (d) <title>
  27. 27.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  28. 28.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  29. 29.What does justify-content: space-between do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
  30. 30.Which of these is not safe to do online? (a) use a nickname in games (b) use a strong password (c) meet an online stranger (d) think before you post
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Space Facts (b) Mars is red. (c) My drawings (d) index.html
  32. 32.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  33. 33.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
  34. 34.Which of these is true of <aside>? (a) is the page’s key part (b) holds a side box of tips (c) holds the logo and title (d) helps you move around
  35. 35.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
  36. 36.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 210px;
      padding: 20px;
      border: 1px solid black;
      margin: 0px;
    }
  37. 37.✍️ In color: blue; which part is the property? (a) blue (b) color (c) ; (d) :
  38. 38.Which of these has a closing tag? (a) <li> (b) <img> (c) <hr> (d) <meta>
  39. 39.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
  40. 40.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>

Answer key

  1. <h2>
  2. 4
  3. dog.jpg
  4. has an address bar
  5. 255
  6. Read the fruit facts
  7. index.html
  8. False
  9. black
  10. a web browser
  11. </title>
  12. 216
  13. the URL
  14. A red kite
  15. False
  16. A tiger asleep
  17. 24
  18. 8
  19. <!DOCTYPE html>
  20. True
  21. a closing tag
  22. 600px or narrower
  23. Yes
  24. Yes
  25. an opening tag
  26. <img>
  27. on the browser tab
  28. <ul>
  29. equal gaps, none at ends
  30. meet an online stranger
  31. Space Facts
  32. <!--
  33. </p>
  34. holds a side box of tips
  35. starts a new line
  36. 252
  37. color
  38. <li>
  39. src
  40. <html>

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids