← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 917 · 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 of these does HTML do? (a) sets colours and fonts (b) shows a pop-up message (c) lays out the page (d) makes a form box
  2. 2.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
  3. 3.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) white (c) black (d) yellow
  4. 4.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is fast (c) the site is a game (d) the data is scrambled
  5. 5.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
  6. 6.📊 Where do <td> cells go? (a) inside a <li> (b) inside a <tr> (c) inside the <head> (d) inside a <p>
  7. 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) shows line numbers (d) saves our .html files
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  10. 10.💪 Which flexbox property picks row or column? (a) justify-content (b) flex-direction (c) gap (d) align-items
  11. 11.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      border: 2px solid;
      width: 300px;
      margin: 10px;
    }
  12. 12.🔁 How many times does this code print “Hello”?
    for (let i = 0; i <= 3; i++) {
      console.log("Hello");
    }
  13. 13.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) https://example.com (b) maths.html (c) art.html (d) School news
  14. 14.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  16. 16.🛡️ Online: is it safe to share your password? (a) safe (b) not safe
  17. 17.What does font-size do? (a) colours behind the text (b) makes letters bigger (c) sets the letter colour (d) centres a heading
  18. 18.⚡ What does this code show?
    let name = "Arjun";
    console.log("Welcome, " + name + "!");
    (a) name (b) Arjun (c) Welcome, name! (d) Welcome, Arjun!
  19. 19.🌍 What is the protocol in this URL?
    http://www.example.com/games/chess.html
    (a) www.example.com (b) https (c) /games/chess.html (d) http
  20. 20.Which of these is true of <main>? (a) is the page’s key part (b) helps you move around (c) holds a news story (d) holds copyright notes
  21. 21.🎨 Which attribute adds CSS inside one tag? (a) style (b) alt (c) href (d) src
  22. 22.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  23. 23.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  24. 24.True or false: JavaScript adds space around boxes. (a) False (b) True
  25. 25.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  26. 26.⚡ What does alert() show? (a) a table (b) a pop-up box (c) a picture (d) a new tab
  27. 27.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) let (c) console.log() (d) if
  28. 28.📝 How many <input> tags are in this form?
    <form>
      <input type="checkbox">
      <input type="text">
      <input type="date">
      <input type="email">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Planets (c) body (d) My Hobbies
  30. 30.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Rain today</p>
    <p>Fun facts</p>
    <h3>Hello, world!</h3>
    <h4>My pets</h4>
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  32. 32.Which of these goes in the head? (a) <img> (b) <h1> (c) <link rel="stylesheet"> (d) <p>
  33. 33.True or false: <input type="submit"> sends the form. (a) False (b) True
  34. 34.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
  35. 35.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
  36. 36.🎨 Which tag holds CSS inside the head? (a) <script> (b) <css> (c) <body> (d) <style>
  37. 37.🎨 One CSS file can style how many pages? (a) only one word (b) many pages (c) no pages (d) only one image
  38. 38.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🔢 When you open a web page, which comes FIRST? (a) the server sends files (b) the browser asks it (c) you type the URL (d) the browser shows it
  40. 40.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Rain today</p>
    <h2>Rain today</h2>

Answer key

  1. makes a form box
  2. an id selector
  3. black
  4. the data is scrambled
  5. <head>
  6. inside a <tr>
  7. in the head
  8. shows pages from the web
  9. moon.png
  10. flex-direction
  11. 3
  12. 4
  13. https://example.com
  14. an attribute
  15. F
  16. not safe
  17. makes letters bigger
  18. Welcome, Arjun!
  19. http
  20. is the page’s key part
  21. style
  22. No
  23. No
  24. False
  25. 12
  26. a pop-up box
  27. alert()
  28. 6
  29. Planets
  30. 3
  31. 3
  32. <link rel="stylesheet">
  33. True
  34. it tells its meaning
  35. semantic
  36. <style>
  37. many pages
  38. in the body
  39. you type the URL
  40. 2

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