← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 474 · 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 text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    (a) Good morning! (b) My pets (c) The red kite
  2. 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  3. 3.🔗 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">
  4. 4.⚡ What does this code show?
    let name = "Aman";
    console.log("Hi, " + name + "!");
    (a) name (b) Aman (c) Hi, name! (d) Hi, Aman!
  5. 5.🖌️ How big is the text, in px?
    h2 {
      color: green;
      text-align: center;
      background-color: purple;
      font-size: 40px;
    }
  6. 6.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 260px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  8. 8.🧭 Is <footer> semantic or not semantic? (a) semantic (b) not semantic
  9. 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
  10. 10.🖌️ What colour is behind the letters?
    li {
      background-color: orange;
      font-size: 24px;
      text-align: center;
      color: red;
    }
    (a) red (b) orange (c) white
  11. 11.Which of these goes in the head? (a) <ul> (b) <title> (c) <h1> (d) <table>
  12. 12.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  13. 13.✍️ What value is given to width in this rule?
    p {
      width: 300px;
      text-align: center;
    }
    (a) italic (b) 300px (c) red (d) width
  14. 14.True or false: img is a class selector. (a) False (b) True
  15. 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the shorter one (d) the first one
  16. 16.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  17. 17.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <h2>I love mangoes.</h2>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
  18. 18.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) Art corner (c) art.html (d) news.html
  19. 19.🔍 Which is the odd one out? (a) makes headings and lists (b) makes a form box (c) sets colours and fonts (d) makes a link
  20. 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
  21. 21.True or false: <h1> goes in the head. (a) True (b) False
  22. 22.📝 Which input type sends the form? (a) number (b) email (c) submit (d) text
  23. 23.True or false: <table> makes one data cell. (a) False (b) True
  24. 24.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
  25. 25.🔁 What does i++ do? (a) prints i (b) adds 1 to i (c) takes 1 from i (d) doubles i
  26. 26.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <p>Good morning!</p>
  27. 27.⚡ What number does this code print?
    let runs = 17;
    runs = runs + 10;
    runs = runs - 24;
    console.log(runs);
  28. 28.✍️ What is the selector in this CSS rule?
    .note {
      border: 2px solid;
      width: 300px;
      color: red;
      background-color: yellow;
    }
    (a) #top (b) .note (c) border (d) 300px
  29. 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  30. 30.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
  31. 31.Which of these is a closing tag? (a) <p> (b) <b> (c) </title> (d) <h1>
  32. 32.⚖️ What colour is the text of this element?
    <p class="red" id="main">Hi</p>
    CSS:
    p { color: yellow; }
    p { color: purple; }
    (a) black (b) red (c) yellow (d) purple
  33. 33.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <link script.js> (d) <js src="script.js">
  34. 34.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  35. 35.True or false: <title> goes in the head. (a) True (b) False
  36. 36.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) map.png (b) A red kite (c) kite.png (d) cake.jpg
  37. 37.🖌️ What colour is behind the letters?
    h1 {
      font-size: 28px;
      text-align: left;
      color: red;
      background-color: green;
    }
    (a) purple (b) red (c) green
  38. 38.⚡ What does alert() show? (a) a table (b) a picture (c) a new tab (d) a pop-up box
  39. 39.🔢 When you open a web page, which comes first: “you type the URL” or “the browser asks it”? (a) you type the URL (b) the browser asks it
  40. 40.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute

Answer key

  1. The red kite
  2. href
  3. <a href="about.html">
  4. Hi, Aman!
  5. 40
  6. 70
  7. 3
  8. semantic
  9. Yes
  10. orange
  11. <title>
  12. 3
  13. 300px
  14. False
  15. the later one
  16. alt
  17. 2
  18. maths.html
  19. sets colours and fonts
  20. write the HTML
  21. False
  22. submit
  23. False
  24. semantic
  25. adds 1 to i
  26. 2
  27. 3
  28. .note
  29. No
  30. 20
  31. </title>
  32. purple
  33. <script src="script.js">
  34. <!DOCTYPE html>
  35. True
  36. kite.png
  37. green
  38. a pop-up box
  39. you type the URL
  40. an attribute

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