← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 876 · 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 attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  2. 2.True or false: <main> helps you move around. (a) False (b) True
  3. 3.What does text-align do? (a) picks the font style (b) sets the letter colour (c) centres a heading (d) colours behind the text
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  5. 5.Which of these goes in the body? (a) <h1> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
  6. 6.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  7. 7.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  8. 8.🖌️ What colour are the letters?
    p {
      font-size: 40px;
      color: black;
      text-align: right;
      background-color: red;
    }
    (a) green (b) red (c) black
  9. 9.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  10. 10.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the later one (d) the first one
  11. 11.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
  12. 12.🚀 Which file should this code go in: p { color: red; } (a) style.css (b) index.html (c) script.js
  13. 13.🚀 Which file should this code go in: .box { padding: 8px; } (a) script.js (b) index.html (c) style.css
  14. 14.🖌️ What colour is behind the letters?
    li {
      text-align: right;
      color: white;
      background-color: black;
      font-size: 16px;
    }
    (a) white (b) black (c) yellow
  15. 15.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <a> (d) <link>
  16. 16.Which of these goes in the body? (a) <title> (b) <img> (c) <style> (d) <meta charset="utf-8">
  17. 17.True or false: <a href="a.html">Go</a> goes in index.html. (a) False (b) True
  18. 18.True or false: <ul><li>Art</li></ul> goes in index.html. (a) False (b) True
  19. 19.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
  20. 20.⚡ What does this code show?
    let name = "Aman";
    console.log("Welcome, " + name + "!");
    (a) name (b) Aman (c) Welcome, Aman! (d) Welcome, name!
  21. 21.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) space-between (d) flex-end
  22. 22.True or false: #main is an id selector. (a) True (b) False
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  24. 24.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      margin: 10px;
      border: 2px solid;
      width: 300px;
      font-weight: bold;
    }
  25. 25.🎯 Which element does the selector #main style? (a) <span id="logo"> (b) <p class="menu"> (c) <span class="main"> (d) <span id="main">
  26. 26.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  27. 27.🔍 Which is the odd one out? (a) gives the page structure (b) makes headings and lists (c) sets colours and fonts (d) puts a picture on a page
  28. 28.Which of these is true of <footer>? (a) holds a side box of tips (b) sits at the bottom (c) holds the logo and title (d) holds the menu of links
  29. 29.🔍 One closing tag is missing. Which one?
    <strong>The red kite</strong>
    <b>Hello, world!
    <i>Rain today</i>
    (a) </strong> (b) </u> (c) </i> (d) </b>
  30. 30.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 12px;
      }
    }
  31. 31.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus
  32. 32.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  33. 33.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  34. 34.🔍 Which is the odd one out? (a) counts down a timer (b) changes the page live (c) makes a form box (d) reacts to a button click
  35. 35.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) about.html
  36. 36.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      color: red;
      padding: 8px;
      font-style: italic;
    }
  38. 38.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
  40. 40.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Litchi</td><td>Litchi</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Banana</td><td>Grapes</td><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Mango</td><td>Banana</td><td>Mango</td><td>Jamun</td></tr>
    </table>

Answer key

  1. href
  2. False
  3. centres a heading
  4. 2
  5. <h1>
  6. <a>
  7. an attribute
  8. black
  9. No
  10. the later one
  11. height
  12. style.css
  13. style.css
  14. black
  15. <link>
  16. <img>
  17. True
  18. True
  19. 51
  20. Welcome, Aman!
  21. flex-start
  22. True
  23. 350
  24. 4
  25. <span id="main">
  26. 6
  27. sets colours and fonts
  28. sits at the bottom
  29. </b>
  30. 12
  31. bus.jpg
  32. <a href="about.html">
  33. in the same tab
  34. makes a form box
  35. Take the quiz
  36. in the body
  37. 3
  38. makes it harder
  39. 1
  40. 4

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