← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 390 · 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: HTML puts a picture on a page. (a) False (b) True
  2. 2.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  3. 3.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) turned off (c) exactly 100px (d) 800px or wider
  4. 4.✍️ How does a CSS comment start? (a) # (b) <!-- (c) /* (d) //
  5. 5.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Cricket is fun. (b) Fun facts (c) My pets (d) I love mangoes.
  6. 6.⚡ What number does this code print?
    let apples = 27;
    apples = apples + 12;
    apples = apples - 12;
    console.log(apples);
  7. 7.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) makes it harder (b) helps everyone
  8. 8.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  9. 9.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
  10. 10.📊 Which tag makes one data cell? (a) <table> (b) <caption> (c) <tr> (d) <td>
  11. 11.True or false: CSS makes headings and lists. (a) True (b) False
  12. 12.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  13. 13.🌍 What finds the server for a domain name like example.com? (a) CSS (b) HTML (c) alt (d) DNS
  14. 14.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
  15. 15.True or false: HTML on its own can make links to pages. (a) True (b) False
  16. 16.🎯 What kind of selector is body? (a) an id selector (b) a class selector (c) an element selector
  17. 17.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
  18. 18.🔁 What does this code print?
    let score = 9;
    if (score > 15) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  19. 19.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
  22. 22.📋 What number does the browser show next to “Banana”?
    <ol start="3">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  23. 23.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  24. 24.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 150px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  25. 25.True or false: HTML on its own cannot make tables. (a) False (b) True
  26. 26.🧭 Which semantic tag holds the main content? (a) <aside> (b) <footer> (c) <main> (d) <article>
  27. 27.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  28. 28.💪 Which justify-content value packs boxes at the end? (a) flex-end (b) space-between (c) center (d) flex-start
  29. 29.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  30. 30.Which of these is the border? (a) the gap to other boxes (b) space inside the border (c) space outside the border (d) the line round the box
  31. 31.True or false: <p>Hello!</p> goes in style.css. (a) False (b) True
  32. 32.🖌️ Which CSS property colours behind the text? (a) font-family (b) font-size (c) color (d) background-color
  33. 33.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      background-color: yellow;
    }
  34. 34.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="300">
    (a) fort.jpg (b) The full moon (c) bus.jpg (d) moon.png
  35. 35.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) maths.html (c) art.html (d) news.html
  36. 36.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  37. 37.What does font-family do? (a) makes the text bold (b) picks the font style (c) centres a heading (d) sets the letter colour
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Planets (d) I like to read.
  39. 39.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
  40. 40.Which of these is true of <aside>? (a) sits at the bottom (b) holds the menu of links (c) holds extra side notes (d) sits at the very top

Answer key

  1. True
  2. a code editor
  3. 800px or wider
  4. /*
  5. I love mangoes.
  6. 27
  7. helps everyone
  8. a line across the page
  9. 22
  10. <td>
  11. False
  12. in a new tab
  13. DNS
  14. semantic
  15. True
  16. an element selector
  17. .
  18. Play again
  19. 3
  20. Yes
  21. 1
  22. 4
  23. bullets
  24. 50
  25. False
  26. <main>
  27. 1
  28. flex-end
  29. No
  30. the line round the box
  31. False
  32. background-color
  33. 1
  34. moon.png
  35. maths.html
  36. </h2>
  37. picks the font style
  38. Planets
  39. 6
  40. holds extra side notes

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