← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 280 · 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.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  3. 3.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  4. 4.Which of these is true of a code editor? (a) shows pages from the web (b) has an address bar (c) colours code to help us (d) hosts websites online
  5. 5.🖌️ What colour is behind the letters?
    h2 {
      font-size: 24px;
      background-color: yellow;
      color: green;
      text-align: left;
    }
    (a) green (b) yellow (c) blue
  6. 6.🎯 How many elements on a page should have the same id? (a) 5 (b) 1 (c) 2 (d) any number
  7. 7.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
  8. 8.⚡ Which JavaScript word writes in the console? (a) if (b) console.log() (c) let (d) alert()
  9. 9.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Grapes</td></tr>
    </table>
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  12. 12.✍️ What value is given to width in this rule?
    #top {
      color: red;
      text-align: center;
      background-color: yellow;
      width: 300px;
    }
    (a) red (b) italic (c) 300px (d) width
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  14. 14.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the start (c) puts boxes in the middle (d) packs boxes at the end
  15. 15.✍️ In color: blue; which part is the value? (a) color (b) : (c) ; (d) blue
  16. 16.Which of these is a strong password? (a) S0lar!Pen#8 (b) qwerty (c) password (d) riya2014
  17. 17.🎯 What kind of selector is #logo? (a) a class selector (b) an id selector (c) an element selector
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) width (c) Map of India (d) kite.png
  19. 19.🌍 What is the path in this URL?
    https://learn.example.com/about.html
    (a) learn.example.com (b) /maths/tables.html (c) https (d) /about.html
  20. 20.⚖️ What colour is the text of this element?
    <h2 class="star" id="logo">Hi</h2>
    CSS:
    h2 { color: blue; }
    h2 { color: purple; }
    (a) orange (b) yellow (c) blue (d) purple
  21. 21.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 100px;
      padding: 25px;
      border: 2px solid black;
      margin: 0px;
    }
  22. 22.Which of these is a closing tag? (a) <title> (b) </b> (c) <p> (d) <li>
  23. 23.Which of these is an opening tag? (a) </p> (b) </b> (c) <body> (d) </title>
  24. 24.📦 In the box model, which part is the text or picture? (a) padding (b) border (c) margin (d) content
  25. 25.♿ Which link text is clearest? (a) here (b) link (c) Read the fruit facts (d) click here
  26. 26.✍️ What value is given to color in this rule?
    h2 {
      color: red;
      font-weight: bold;
    }
    (a) color (b) 20px (c) center (d) red
  27. 27.⚖️ What colour is the text of this element?
    <h1 class="box" id="top">Hi</h1>
    CSS:
    h1 { color: white; }
    h1 { color: blue; }
    (a) red (b) yellow (c) white (d) blue
  28. 28.True or false: HTML on its own can show paragraphs. (a) False (b) True
  29. 29.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
  30. 30.💪 Which flexbox property sets space between boxes? (a) display: flex (b) justify-content (c) gap (d) flex-direction
  31. 31.🌈 Which colour is #00ffff? (a) cyan (b) black (c) white (d) bright green
  32. 32.💾 A web page file usually ends with which extension? (a) .html (b) .mp3 (c) .png (d) .txt
  33. 33.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  34. 34.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  36. 36.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  37. 37.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
  38. 38.⚡ Which JavaScript word makes a new variable? (a) if (b) alert() (c) console.log() (d) let
  39. 39.What does font-family do? (a) colours behind the text (b) centres a heading (c) picks the font style (d) makes the text bold
  40. 40.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>

Answer key

  1. in the head
  2. <a href="about.html">
  3. a code editor
  4. colours code to help us
  5. yellow
  6. 1
  7. a slash /
  8. console.log()
  9. 6
  10. red
  11. <h5>
  12. 300px
  13. <h2>
  14. packs boxes at the start
  15. blue
  16. S0lar!Pen#8
  17. an id selector
  18. A red kite
  19. /about.html
  20. purple
  21. 154
  22. </b>
  23. <body>
  24. content
  25. Read the fruit facts
  26. red
  27. blue
  28. True
  29. to describe the image
  30. gap
  31. cyan
  32. .html
  33. <a>
  34. Yes
  35. <h6>
  36. <h1>
  37. the body
  38. let
  39. picks the font style
  40. 5

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