← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 825 · 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.📊 Which tag holds the whole table? (a) <tr> (b) <th> (c) <table> (d) <td>
  2. 2.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #00ff00 (d) #ff00ff
  3. 3.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 7; i++) {
      console.log("Well done");
    }
  4. 4.⚖️ What colour is the text of this element?
    <h2 class="star" id="intro">Hi</h2>
    CSS:
    .star { color: orange; }
    .star { color: blue; }
    (a) blue (b) orange (c) red (d) purple
  5. 5.🔗 Where does this link open?
    <a href="games.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  6. 6.True or false: <article> holds one blog post. (a) False (b) True
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) body (c) Art Gallery (d) My drawings
  8. 8.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  9. 9.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
  10. 10.🎯 Which CSS selector matches this element?
    <li class="big" id="top">Hello</li>
    (a) .red (b) li (c) #intro (d) #big
  11. 11.🖌️ Which CSS property sets the letter colour? (a) text-align (b) color (c) background-color (d) font-size
  12. 12.Which of these goes in the head? (a) <a> (b) <link rel="stylesheet"> (c) <h1> (d) <p>
  13. 13.🔁 Which loop repeats code a set number of times? (a) else (b) if (c) for (d) let
  14. 14.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
  15. 15.♿ Does this help everyone, or make the page harder to use: skipping heading levels? (a) makes it harder (b) helps everyone
  16. 16.🌍 What is the domain name in this URL?
    https://www.example.com/about.html
    (a) https (b) kids.example.org (c) www.example.com (d) /about.html
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort
  18. 18.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) maths.html (b) About us (c) contact.html (d) https://example.com
  19. 19.🔢 When you open a web page, what comes right after “the server sends files”? (a) the browser asks it (b) DNS finds the server (c) you type the URL (d) the browser shows it
  20. 20.True or false: to share your OTP is not safe. (a) False (b) True
  21. 21.Which of these is an opening tag? (a) </title> (b) </li> (c) <b> (d) </h1>
  22. 22.🖌️ How big is the text, in px?
    li {
      color: yellow;
      text-align: left;
      background-color: blue;
      font-size: 16px;
    }
  23. 23.True or false: HTML makes a link. (a) True (b) False
  24. 24.💬 How does an HTML comment end? (a) */ (b) --> (c) >> (d) //
  25. 25.True or false: to share your password is safe. (a) False (b) True
  26. 26.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #0000ff
  27. 27.Which of these is a strong password? (a) 111111 (b) 123456 (c) riya2014 (d) Kite_Fl1es@Dawn
  28. 28.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  29. 29.True or false: <main> holds the menu of links. (a) True (b) False
  30. 30.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  31. 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  33. 33.🎨 A CSS file usually ends with which extension? (a) .css (b) .js (c) .png (d) .html
  34. 34.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
  35. 35.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 32px;
      }
    }
    (a) No (b) Yes
  36. 36.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
  37. 37.What does color do? (a) makes letters bigger (b) centres a heading (c) sets the letter colour (d) makes the text bold
  38. 38.📊 In a table, which tag is a row? (a) <td> (b) <tr> (c) <th> (d) <tb>
  39. 39.⚖️ What colour is the text of this element?
    <p class="star" id="logo">Hi</p>
    CSS:
    #logo { color: white; }
    p { color: orange; }
    (a) orange (b) purple (c) white (d) yellow
  40. 40.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) secret text (d) very big text

Answer key

  1. <table>
  2. #ff0000
  3. 5
  4. blue
  5. in a new tab
  6. True
  7. My drawings
  8. <img>
  9. the screen width
  10. li
  11. color
  12. <link rel="stylesheet">
  13. for
  14. 24
  15. makes it harder
  16. www.example.com
  17. An old fort
  18. contact.html
  19. the browser shows it
  20. True
  21. <b>
  22. 16
  23. True
  24. -->
  25. False
  26. #0000ff
  27. Kite_Fl1es@Dawn
  28. <a>
  29. False
  30. True
  31. opens it in a new tab
  32. 50
  33. .css
  34. <h1>
  35. Yes
  36. 4
  37. sets the letter colour
  38. <tr>
  39. white
  40. text with links

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