← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 344 · 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.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      margin: 10px;
      font-weight: bold;
      border: 2px solid;
      font-style: italic;
    }
  2. 2.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  3. 3.Which colour pair is hard to read? (a) yellow on black (b) light grey on white (c) white on dark blue (d) dark grey on white
  4. 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  5. 5.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  6. 6.📊 In a table, which tag is a row? (a) <tr> (b) <tb> (c) <th> (d) <td>
  7. 7.🎯 Which CSS selector matches this element?
    <li class="red" id="hero">Hello</li>
    (a) div (b) li (c) .box (d) .hero
  8. 8.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) Riya’s Recipes (d) All about me
  10. 10.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Rain today</p>
    <h4>The red kite</h4>
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <h2>I love mangoes.
    line 3: <h1>The red kite</h1>
    (a) line 3 (b) line 1 (c) line 2
  12. 12.📊 How many cells are in each row?
    <table>
      <tr><td>Papaya</td><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Mango</td></tr>
    </table>
  13. 13.Which of these does JavaScript do? (a) lays out the page (b) reacts to a button click (c) gives the page structure (d) makes headings and lists
  14. 14.True or false: <aside> holds a side box of tips. (a) False (b) True
  15. 15.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ff00ff
  16. 16.♿ What does good colour contrast mean? (a) no colours at all (b) many bright colours (c) only red text (d) text stands out clearly
  17. 17.🚀 What is the home page file of a website usually called? (a) main.png (b) start.js (c) home.css (d) index.html
  18. 18.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  19. 19.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) for (d) let
  20. 20.⚡ What does this code show?
    let name = "Arjun";
    console.log("Hi, " + name + "!");
    (a) Arjun (b) name (c) Hi, name! (d) Hi, Arjun!
  21. 21.What does font-size do? (a) sets the letter colour (b) makes letters bigger (c) centres a heading (d) makes the text bold
  22. 22.True or false: a code editor shows line numbers. (a) True (b) False
  23. 23.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  24. 24.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
  25. 25.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) ; (d) .
  26. 26.True or false: in <img>, height names the picture file. (a) False (b) True
  27. 27.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
  28. 28.What does justify-content: space-between do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the end (d) packs boxes at the start
  29. 29.🛡️ Before typing a password on a site, check the address starts with ___. (a) https (b) www (c) http (d) ftp
  30. 30.🌍 What does a web address (URL) tell the browser? (a) your password (b) how old you are (c) the page colour (d) where the page is
  31. 31.✍️ Which property is set to 20px in this rule?
    .note {
      font-size: 20px;
      border: 2px solid;
    }
    (a) text-align (b) 20px (c) background-color (d) font-size
  32. 32.True or false: <ol> lists things in any order. (a) True (b) False
  33. 33.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>Rain today</p>
  34. 34.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h3>Rain today</h3>
    <p>Cricket is fun.</p>
  35. 35.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Our school trip</h3>
    <p>Good morning!</p>
    <h3>Good morning!</h3>
    <h2>Cricket is fun.</h2>
  36. 36.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  37. 37.Which of these is not safe to do online? (a) tell a trusted adult (b) check for https first (c) share your password (d) use a nickname in games
  38. 38.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 170px;
      padding: 30px;
      border: 1px solid black;
      margin: 0px;
    }
  39. 39.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) doubles i (d) adds 1 to i
  40. 40.💪 Which flexbox property turns on flexbox? (a) align-items (b) flex-direction (c) justify-content (d) display: flex

Answer key

  1. 4
  2. easy to read
  3. light grey on white
  4. an attribute
  5. No
  6. <tr>
  7. li
  8. 1
  9. All about me
  10. 2
  11. line 2
  12. 3
  13. reacts to a button click
  14. True
  15. #ff0000
  16. text stands out clearly
  17. index.html
  18. <li>
  19. for
  20. Hi, Arjun!
  21. makes letters bigger
  22. True
  23. <h3>
  24. saves our .html files
  25. ;
  26. False
  27. True
  28. equal gaps, none at ends
  29. https
  30. where the page is
  31. font-size
  32. False
  33. 3
  34. 2
  35. 4
  36. a web browser
  37. share your password
  38. 232
  39. adds 1 to i
  40. display: flex

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