← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 356 · 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.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Birds sing<br>Kites fly high</p>
  3. 3.🔍 Which is the odd one out? (a) shows a pop-up message (b) checks a quiz answer (c) changes the page live (d) rounds box corners
  4. 4.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  5. 5.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tb> (d) <tr>
  6. 6.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  7. 7.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  8. 8.What does background-color do? (a) makes the text bold (b) makes letters bigger (c) colours behind the text (d) sets the letter colour
  9. 9.Which of these is true of a web browser? (a) shows line numbers (b) sends pages over the net (c) turns HTML into a page (d) saves our .html files
  10. 10.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  11. 11.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <h3>Our school trip
    <h1>Fun facts</h1>
    (a) </h1> (b) </strong> (c) </h3> (d) </em>
  12. 12.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Papaya</td><td>Orange</td></tr>
    </table>
  13. 13.True or false: <tr> gives the table a title. (a) False (b) True
  14. 14.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>Hello, world!</p>
  15. 15.True or false: <h1> is an empty tag. (a) False (b) True
  16. 16.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  17. 17.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Banana</td><td>Litchi</td><td>Orange</td></tr>
    </table>
  18. 18.🎨 Which attribute adds CSS inside one tag? (a) src (b) href (c) alt (d) style
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <small>I love mangoes.</small>
    line 2: <h1>My best friend</h1>
    line 3: <u>Good morning!
    (a) line 3 (b) line 1 (c) line 2
  20. 20.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  21. 21.⚖️ What colour is the text of this element?
    <h2 class="big" id="top">Hi</h2>
    CSS:
    .big { color: purple; }
    #top { color: black; }
    h2 { color: green; }
    (a) yellow (b) green (c) black (d) purple
  22. 22.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) Art corner (c) href (d) https://example.com
  23. 23.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  24. 24.🎯 What kind of selector is .star? (a) an element selector (b) an id selector (c) a class selector
  25. 25.⚡ What number does this code print?
    let a = 12;
    let b = 25;
    console.log(a + b);
  26. 26.⚡ Which JavaScript word repeats code? (a) for (b) if (c) let (d) alert()
  27. 27.What does font-family do? (a) centres a heading (b) makes letters bigger (c) colours behind the text (d) picks the font style
  28. 28.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  29. 29.🎯 What kind of selector is .menu? (a) an element selector (b) an id selector (c) a class selector
  30. 30.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>
  31. 31.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
  32. 32.🧭 Why use <nav> instead of <div> for a menu? (a) it loads faster (b) it tells its meaning (c) it makes text red (d) it adds pictures
  33. 33.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) art.html (b) href (c) Maths fun (d) Art corner
  34. 34.🎯 Which CSS selector matches this element?
    <li class="big" id="logo">Hello</li>
    (a) .red (b) .logo (c) li (d) #big
  35. 35.⚡ What number does this code print?
    let apples = 27;
    apples = apples + 16;
    apples = apples - 25;
    console.log(apples);
  36. 36.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Creative Sheet System (d) Cascading Style Sheets
  37. 37.⚡ What does this code show?
    let name = "Aman";
    alert("Hi, " + name + "!");
    (a) Hi, name! (b) name (c) Aman (d) Hi, Aman!
  38. 38.🔢 In a basic web page file, which comes first: “</html>” or “<head>”? (a) <head> (b) </html>
  39. 39.🌍 What is the domain name in this URL?
    http://www.example.net/games/chess.html
    (a) http (b) /games/chess.html (c) www.example.net (d) learn.example.com
  40. 40.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <nav> (b) <header> (c) <footer>

Answer key

  1. an opening tag
  2. 4
  3. rounds box corners
  4. <h6>
  5. <tr>
  6. <!--
  7. height
  8. colours behind the text
  9. turns HTML into a page
  10. an id selector
  11. </h3>
  12. 3
  13. False
  14. 1
  15. False
  16. <
  17. 2
  18. style
  19. line 3
  20. opens it in a new tab
  21. black
  22. Art corner
  23. 5
  24. a class selector
  25. 37
  26. for
  27. picks the font style
  28. 12
  29. a class selector
  30. <!DOCTYPE html>
  31. not safe
  32. it tells its meaning
  33. Maths fun
  34. li
  35. 18
  36. Cascading Style Sheets
  37. Hi, Aman!
  38. <head>
  39. www.example.net
  40. <footer>

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