← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 349 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Easy snacks (c) Riya’s Recipes (d) body
  2. 2.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
  3. 3.🧭 Which semantic tag holds a side box of tips? (a) <main> (b) <footer> (c) <aside> (d) <article>
  4. 4.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <header> (b) <main>
  5. 5.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 17; i = i + 2) {
      console.log(i);
    }
  6. 6.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 6; i = i + 3) {
      console.log(i);
    }
  7. 7.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts (d) My pets
  8. 8.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
  9. 9.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  10. 10.⚡ What does this code show?
    let name = "Zoya";
    alert("Well done, " + name + "!");
    (a) Zoya (b) name (c) Well done, Zoya! (d) Well done, name!
  11. 11.✍️ In color: blue; which part is the property? (a) : (b) color (c) ; (d) blue
  12. 12.🧩 Which language checks a quiz answer? (a) CSS (b) JavaScript (c) HTML
  13. 13.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
  14. 14.📝 Which input type is for one line of words? (a) date (b) text (c) email (d) password
  15. 15.What is <input type="number"> for? (a) is for one line of words (b) hides what you type (c) picks a day (d) takes only numbers
  16. 16.🔁 How many numbers does this code print?
    for (let i = 0; i < 14; i = i + 2) {
      console.log(i);
    }
  17. 17.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 15px;
      border: 1px solid black;
      margin: 5px;
    }
  18. 18.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
  19. 19.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
  20. 20.♿ A part of the page is under a <h3> heading. Which tag should its sub-heading use? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  21. 21.🚀 Which tag loads script.js into a page? (a) <link script.js> (b) <script src="script.js"> (c) <a href="script.js"> (d) <js src="script.js">
  22. 22.🔠 Are headings shown in bold by default? (a) Yes (b) No
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  24. 24.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
  25. 25.🔁 What does this code print?
    let marks = 46;
    if (marks > 31) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
  27. 27.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  28. 28.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
  29. 29.Which of these is a strong password? (a) riya2014 (b) 111111 (c) abcd1234 (d) Mango#Kite29!
  30. 30.Which of these is safe to do online? (a) click prize links (b) download from pop-ups (c) think before you post (d) put secrets in comments
  31. 31.🔁 How many times does this code print “Hi”?
    for (let i = 0; i <= 2; i++) {
      console.log("Hi");
    }
  32. 32.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) news.html (b) Contact us (c) art.html (d) quiz.html
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="menu" id="end">Hi</h2>
    CSS:
    .menu { color: green; }
    #end { color: red; }
    (a) green (b) black (c) blue (d) red
  34. 34.True or false: <th> makes a heading cell. (a) True (b) False
  35. 35.🎯 What kind of selector is img? (a) an element selector (b) an id selector (c) a class selector
  36. 36.Which of these does HTML do? (a) reacts to a button click (b) shows a pop-up message (c) rounds box corners (d) makes headings and lists
  37. 37.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  38. 38.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the console (d) in the address bar
  39. 39.True or false: <h1> goes in the body. (a) False (b) True
  40. 40.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->

Answer key

  1. Easy snacks
  2. 51
  3. <aside>
  4. <header>
  5. 16
  6. 3
  7. Hello, world!
  8. 5
  9. False
  10. Well done, Zoya!
  11. color
  12. JavaScript
  13. <nav>
  14. text
  15. takes only numbers
  16. 7
  17. 102
  18. <!DOCTYPE html>
  19. .
  20. <h4>
  21. <script src="script.js">
  22. Yes
  23. 400
  24. </body>
  25. Pass
  26. <h1>
  27. href
  28. blue
  29. Mango#Kite29!
  30. think before you post
  31. 3
  32. art.html
  33. red
  34. True
  35. an element selector
  36. makes headings and lists
  37. the body
  38. in the console
  39. True
  40. 2

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