← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 353 · 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.True or false: score = score + 1; goes in script.js. (a) True (b) False
  2. 2.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  3. 3.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  4. 4.🧭 How many <main> parts should a page have? (a) none (b) one (c) three (d) ten
  5. 5.♿ Who uses a screen reader? (a) people who are blind (b) only teachers (c) only coders (d) only robots
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Cricket Club (c) Try this poha. (d) index.html
  7. 7.True or false: HTML on its own cannot make tables. (a) True (b) False
  8. 8.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </title>
  9. 9.Which of these is a strong password? (a) 123456 (b) 111111 (c) Chai$Cup_19x (d) password
  10. 10.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <p>My pets</p>
  11. 11.🌍 What is the path in this URL?
    https://www.example.net/news/today.html
    (a) https (b) /news/today.html (c) www.example.net (d) /games/chess.html
  12. 12.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) width (b) Birthday cake (c) A happy dog (d) cake.jpg
  14. 14.🎨 One CSS file can style how many pages? (a) many pages (b) no pages (c) only one image (d) only one word
  15. 15.🔁 How many numbers does this code print?
    for (let i = 0; i < 7; i = i + 4) {
      console.log(i);
    }
  16. 16.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      width: 300px;
      font-style: italic;
      font-size: 20px;
    }
  17. 17.Which of these does JavaScript do? (a) puts a picture on a page (b) gives the page structure (c) lays out the page (d) counts down a timer
  18. 18.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <link> (d) <a>
  19. 19.🌗 Is red on green easy or hard to read? (a) hard to read (b) easy to read
  20. 20.📊 How many cells does this table have in all?
    <table>
      <tr><td>Papaya</td><td>Orange</td><td>Mango</td><td>Litchi</td></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Banana</td><td>Grapes</td><td>Mango</td></tr>
      <tr><td>Litchi</td><td>Litchi</td><td>Mango</td><td>Mango</td></tr>
    </table>
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Planets (c) body (d) Art Gallery
  22. 22.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
  23. 23.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      width: 300px;
      font-size: 20px;
    }
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
  25. 25.Which of these is a closing tag? (a) <h1> (b) <title> (c) <li> (d) </body>
  26. 26.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 22px;
      }
    }
  27. 27.🎯 Which CSS selector matches this element?
    <p class="menu" id="logo">Hello</p>
    (a) h1 (b) #end (c) .logo (d) #logo
  28. 28.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 10; i = i + 2) {
      console.log(i);
    }
  29. 29.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>My pets</p>
  31. 31.⚖️ What colour is the text of this element?
    <p class="big" id="hero">Hi</p>
    CSS:
    p { color: red; }
    p { color: white; }
    (a) orange (b) purple (c) red (d) white
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg
  33. 33.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.🌈 Which colour is #00ff00? (a) magenta (b) red (c) bright green (d) black
  36. 36.📦 In the box model, which part is the gap round content? (a) margin (b) border (c) padding (d) content
  37. 37.What does justify-content: flex-end do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
  38. 38.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) cyan (d) magenta
  39. 39.Which of these does CSS do? (a) makes headings and lists (b) changes the page live (c) reacts to a button click (d) sets colours and fonts
  40. 40.What is <input type="password"> for? (a) lets you pick only one (b) hides what you type (c) picks a day (d) sends the form

Answer key

  1. True
  2. <a href="about.html">
  3. <ol>
  4. one
  5. people who are blind
  6. Cricket Club
  7. False
  8. </title>
  9. Chai$Cup_19x
  10. 3
  11. /news/today.html
  12. 2
  13. Birthday cake
  14. many pages
  15. 2
  16. 3
  17. counts down a timer
  18. <link>
  19. hard to read
  20. 16
  21. Planets
  22. an element selector
  23. 2
  24. a slash /
  25. </body>
  26. 22
  27. #logo
  28. 8
  29. href
  30. 2
  31. white
  32. An old fort
  33. an empty tag
  34. a closing tag
  35. bright green
  36. padding
  37. packs boxes at the end
  38. magenta
  39. sets colours and fonts
  40. hides what you type

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