← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 15 · 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 domain name in this URL?
    https://www.example.net/maths/tables.html
    (a) www.example.net (b) /maths/tables.html (c) https (d) learn.example.com
  2. 2.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    (a) Hello, world! (b) My pets (c) Rain today (d) I love mangoes.
  4. 4.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) href (c) https://example.com (d) Visit the site
  5. 5.Which of these is safe to do online? (a) download from pop-ups (b) think before you post (c) click prize links (d) meet an online stranger
  6. 6.⚖️ What colour is the text of this element?
    <h1 class="menu" id="end">Hi</h1>
    CSS:
    h1 { color: green; }
    h1 { color: orange; }
    (a) blue (b) orange (c) green (d) purple
  7. 7.What does text-align do? (a) makes letters bigger (b) sets the letter colour (c) centres a heading (d) colours behind the text
  8. 8.What does background-color do? (a) sets the letter colour (b) colours behind the text (c) makes the text bold (d) centres a heading
  9. 9.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
  10. 10.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
  11. 11.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 240px;
      padding: 15px;
      border: 4px solid black;
      margin: 20px;
    }
  12. 12.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    #top { color: orange; }
    #top { color: black; }
    (a) blue (b) black (c) orange (d) green
  13. 13.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Planets (d) We won by 5 runs.
  14. 14.🎯 Which element does the selector .big style? (a) <p class="red"> (b) <p id="big"> (c) <p class="big"> (d) <h1 class="box">
  15. 15.⚡ Which word makes a new variable? (a) put (b) give (c) let (d) make
  16. 16.🎯 Which sign starts a class selector? (a) # (b) & (c) @ (d) .
  17. 17.♿ Which link text is clearest? (a) link (b) here (c) Read the fruit facts (d) click here
  18. 18.📦 In the box model, which part is space inside the border? (a) border (b) margin (c) padding (d) content
  19. 19.True or false: margin is the gap to other boxes. (a) False (b) True
  20. 20.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  21. 21.True or false: <caption> makes one data cell. (a) True (b) False
  22. 22.🌈 In #007c00 the green part is the hex number 7c. What is it as a normal number?
  23. 23.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
  24. 24.Which of these is a closing tag? (a) <title> (b) <h1> (c) <body> (d) </p>
  25. 25.📦 In the box model, which part is the gap round content? (a) padding (b) margin (c) content (d) border
  26. 26.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
  27. 27.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🔠 Are headings shown in bold by default? (a) Yes (b) No
  29. 29.🎯 Which element does the selector .menu style? (a) <li class="menu"> (b) <li class="note"> (c) <div class="big"> (d) <li id="menu">
  30. 30.🚀 Which file should this code go in: body { margin: 0; } (a) script.js (b) style.css (c) index.html
  31. 31.True or false: <ol> is an ordered list. (a) True (b) False
  32. 32.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 28px;
      }
    }
  33. 33.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    (a) Cricket is fun. (b) Hello, world! (c) Good morning!
  34. 34.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) map.png (b) cake.jpg (c) A red kite (d) kite.png
  35. 35.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  36. 36.🎯 Which CSS selector matches this element?
    <h1 class="box" id="top">Hello</h1>
    (a) #box (b) #intro (c) .top (d) .box
  37. 37.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  38. 38.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) style.css (c) index.html
  39. 39.True or false: HTML makes a link. (a) False (b) True
  40. 40.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong

Answer key

  1. www.example.net
  2. in the body
  3. My pets
  4. Visit the site
  5. think before you post
  6. orange
  7. centres a heading
  8. colours behind the text
  9. 2
  10. </h2>
  11. 318
  12. black
  13. Planets
  14. <p class="big">
  15. let
  16. .
  17. Read the fruit facts
  18. padding
  19. True
  20. blue
  21. False
  22. 124
  23. <link>
  24. </p>
  25. padding
  26. <li>
  27. in the head
  28. Yes
  29. <li class="menu">
  30. style.css
  31. True
  32. 20
  33. Hello, world!
  34. kite.png
  35. in a new tab
  36. .box
  37. a web server
  38. script.js
  39. True
  40. strong

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