← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 815 · 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 colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) blue (d) bright green
  2. 2.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 16px;
      }
    }
    (a) No (b) Yes
  3. 3.🧩 Which language rounds box corners? (a) CSS (b) JavaScript (c) HTML
  4. 4.⚡ What does this code show?
    let name = "Kabir";
    console.log("Hi, " + name + "!");
    (a) Hi, Kabir! (b) Hi, name! (c) name (d) Kabir
  5. 5.Which of these is true of a code editor? (a) sends pages over the net (b) turns HTML into a page (c) colours code to help us (d) shows pages from the web
  6. 6.🌗 Is red on green easy or hard to read? (a) easy to read (b) hard to read
  7. 7.🎯 Which element does the selector h1 style? (a) <h2> (b) <div id="logo"> (c) <li class="red"> (d) <h1 class="red">
  8. 8.📝 Which input type is for one line of words? (a) submit (b) date (c) email (d) text
  9. 9.⚡ What does this code show?
    let name = "Meera";
    console.log("Hello, " + name + "!");
    (a) Hello, Meera! (b) Meera (c) name (d) Hello, name!
  10. 10.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
  11. 11.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>I love mangoes.</h4>
    <h3>Fun facts</h3>
  12. 12.💪 Which flexbox property sets space between boxes? (a) gap (b) align-items (c) flex-direction (d) justify-content
  13. 13.🌍 What is the protocol in this URL?
    http://learn.example.com/maths/tables.html
    (a) learn.example.com (b) http (c) https (d) /maths/tables.html
  14. 14.🌈 Which colour of light is strongest in rgb(81, 81, 255)? (a) green (b) red (c) blue
  15. 15.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  16. 16.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  17. 17.🔍 One closing tag is missing. Which one?
    <p>Rain today</p>
    <h2>Cricket is fun.
    <h1>The red kite</h1>
    (a) </b> (b) </h2> (c) </h1> (d) </p>
  18. 18.⚖️ What colour is the text of this element?
    <h2 class="note" id="logo">Hi</h2>
    CSS:
    .note { color: blue; }
    .note { color: green; }
    (a) orange (b) green (c) blue (d) white
  19. 19.True or false: in <img>, width names the picture file. (a) False (b) True
  20. 20.True or false: padding is space inside the border. (a) False (b) True
  21. 21.⚡ What number does this code print?
    let marks = 18;
    marks = marks + 3;
    marks = marks - 14;
    console.log(marks);
  22. 22.🎯 Which CSS selector matches this element?
    <span class="note" id="intro">Hello</span>
    (a) .big (b) .note (c) .intro (d) #main
  23. 23.🎯 Which sign starts an id selector? (a) . (b) @ (c) # (d) &
  24. 24.⚡ What number does this code print?
    let coins = 14;
    coins = coins + 9;
    coins = coins - 5;
    console.log(coins);
  25. 25.⚡ Which word makes a new variable? (a) let (b) make (c) put (d) give
  26. 26.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 24px;
      }
    }
  27. 27.Which of these does HTML do? (a) shows a pop-up message (b) adds space around boxes (c) makes a form box (d) sets colours and fonts
  28. 28.True or false: score = score + 1; goes in script.js. (a) True (b) False
  29. 29.Which of these is padding? (a) the line round the box (b) space outside the border (c) a solid or dotted edge (d) space inside the border
  30. 30.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  31. 31.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Mango</td><td>Mango</td><td>Banana</td><td>Mango</td></tr>
    </table>
  32. 32.🧩 Which language counts down a timer? (a) CSS (b) JavaScript (c) HTML
  33. 33.🎯 What kind of selector is li? (a) a class selector (b) an id selector (c) an element selector
  34. 34.Which of these is true of <header>? (a) holds the logo and title (b) holds the menu of links (c) is the page’s key part (d) holds extra side notes
  35. 35.💪 Which justify-content value equal gaps, none at ends? (a) center (b) flex-end (c) space-between (d) flex-start
  36. 36.What is <input type="password"> for? (a) takes only numbers (b) hides what you type (c) picks a day (d) is for one line of words
  37. 37.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  38. 38.🔠 Are headings shown in bold by default? (a) Yes (b) No
  39. 39.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <h1> (c) <label> (d) <title>
  40. 40.True or false: HTML on its own cannot make links to pages. (a) True (b) False

Answer key

  1. bright green
  2. Yes
  3. CSS
  4. Hi, Kabir!
  5. colours code to help us
  6. hard to read
  7. <h1 class="red">
  8. text
  9. Hello, Meera!
  10. an attribute
  11. 3
  12. gap
  13. http
  14. blue
  15. <h5>
  16. <a>
  17. </h2>
  18. green
  19. False
  20. True
  21. 7
  22. .note
  23. #
  24. 18
  25. let
  26. 20
  27. makes a form box
  28. True
  29. space inside the border
  30. a code editor
  31. 2
  32. JavaScript
  33. an element selector
  34. holds the logo and title
  35. space-between
  36. hides what you type
  37. map.png
  38. Yes
  39. <label>
  40. False

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