← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 870 · 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.✍️ CSS declarations go inside which brackets? (a) ( ) (b) < > (c) { } (d) [ ]
  2. 2.Which of these is true of a code editor? (a) hosts websites online (b) stores a website’s files (c) saves our .html files (d) shows pages from the web
  3. 3.What does justify-content: center do? (a) packs boxes at the start (b) packs boxes at the end (c) equal gaps, none at ends (d) puts boxes in the middle
  4. 4.Which of these is an opening tag? (a) </body> (b) </b> (c) </title> (d) <li>
  5. 5.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <p>The red kite</p>
  6. 6.True or false: <caption> gives the table a title. (a) False (b) True
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  8. 8.🧭 Which semantic tag holds one blog post? (a) <aside> (b) <header> (c) <main> (d) <article>
  9. 9.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  10. 10.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
  11. 11.True or false: padding is the text or picture. (a) False (b) True
  12. 12.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  13. 13.🎯 What kind of selector is img? (a) an element selector (b) an id selector (c) a class selector
  14. 14.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  15. 15.⚡ What number does this code print?
    let a = 38;
    let b = 9;
    console.log(a + b);
  16. 16.🌈 Which colour of light is strongest in rgb(20, 75, 179)? (a) green (b) blue (c) red
  17. 17.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.</h3>
    <b>My best friend
    <h2>Hello, world!</h2>
    (a) </b> (b) </h2> (c) </h3> (d) </p>
  18. 18.🌍 What does a web address (URL) tell the browser? (a) where the page is (b) your password (c) the page colour (d) how old you are
  19. 19.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 140px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  20. 20.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a link (d) a picture
  21. 21.🔁 What does this code print?
    let age = 37;
    if (age > 19) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  22. 22.🎯 Which CSS selector matches this element?
    <li class="big" id="hero">Hello</li>
    (a) .red (b) div (c) #hero (d) .hero
  23. 23.🖌️ Where does the text sit on its line?
    p {
      text-align: right;
      color: black;
      background-color: green;
      font-size: 36px;
    }
    (a) on the left (b) in the middle (c) on the right
  24. 24.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  25. 25.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Good morning!</p>
    (a) My pets (b) Fun facts (c) Good morning! (d) Our school trip
  27. 27.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>Good morning!</h2>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) tiger.jpg (b) bus.jpg (c) Our school bus (d) fort.jpg
  29. 29.True or false: <th> makes a heading cell. (a) False (b) True
  30. 30.🔍 Which is the odd one out? (a) adds space around boxes (b) changes the text size (c) reacts to a button click (d) sets colours and fonts
  31. 31.Which of these does HTML do? (a) changes the text size (b) reacts to a button click (c) gives the page structure (d) adds space around boxes
  32. 32.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
  34. 34.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
  35. 35.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus
  36. 36.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) notes.txt (c) style.css (d) script.js
  37. 37.♿ Who uses a screen reader? (a) people who are blind (b) only teachers (c) only robots (d) only coders
  38. 38.Which of these is a strong password? (a) riya2014 (b) 111111 (c) Rain#Drop_42! (d) iloveyou
  39. 39.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  40. 40.✍️ What value is given to width in this rule?
    .note {
      background-color: yellow;
      border: 2px solid;
      width: 300px;
    }
    (a) width (b) italic (c) 300px (d) red

Answer key

  1. { }
  2. saves our .html files
  3. puts boxes in the middle
  4. <li>
  5. 1
  6. True
  7. 4
  8. <article>
  9. False
  10. True
  11. False
  12. easy to read
  13. an element selector
  14. <ul>
  15. 47
  16. blue
  17. </b>
  18. where the page is
  19. 20
  20. a line across the page
  21. teen
  22. #hero
  23. on the right
  24. 10
  25. -->
  26. Our school trip
  27. 3
  28. bus.jpg
  29. True
  30. reacts to a button click
  31. gives the page structure
  32. No
  33. 1
  34. 24
  35. bus.jpg
  36. script.js
  37. people who are blind
  38. Rain#Drop_42!
  39. red
  40. 300px

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