← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 423 · 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 attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  2. 2.🖌️ Where does the text sit on its line?
    li {
      text-align: center;
      background-color: black;
      color: green;
      font-size: 36px;
    }
    (a) on the left (b) on the right (c) in the middle
  3. 3.✍️ Which property is set to 20px in this rule?
    h1 {
      background-color: yellow;
      font-size: 20px;
    }
    (a) background-color (b) text-align (c) font-size (d) 20px
  4. 4.🔍 One closing tag is missing. Which one?
    <p>Hello, world!</p>
    <strong>Rain today</strong>
    <em>Good morning!
    (a) </h1> (b) </p> (c) </strong> (d) </em>
  5. 5.True or false: margin is space inside the border. (a) True (b) False
  6. 6.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  8. 8.🎯 Which sign starts an id selector? (a) @ (b) # (c) . (d) &
  9. 9.⚖️ What colour is the text of this element?
    <h2 class="star" id="main">Hi</h2>
    CSS:
    #main { color: white; }
    h2 { color: green; }
    .star { color: blue; }
    (a) black (b) green (c) blue (d) white
  10. 10.📝 How many <input> tags are in this form?
    <form>
      <input type="checkbox">
      <input type="date">
      <input type="text">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  11. 11.🔍 Which is the odd one out? (a) sets colours and fonts (b) makes a form box (c) changes the text size (d) adds space around boxes
  12. 12.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
  13. 13.🔁 What does this code print?
    let age = 4;
    if (age >= 12) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  14. 14.True or false: “images with no alt” helps everyone use the page. (a) True (b) False
  15. 15.🔢 When you open a web page, which comes first: “the browser asks it” or “the browser shows it”? (a) the browser asks it (b) the browser shows it
  16. 16.🎯 Can many elements share the same class? (a) No (b) Yes
  17. 17.🔁 How many times does this code print “Hi”?
    for (let i = 3; i < 12; i++) {
      console.log("Hi");
    }
  18. 18.🧭 How many <main> parts should a page have? (a) one (b) none (c) ten (d) three
  19. 19.🌈 Which colour is #ffff00? (a) black (b) bright green (c) red (d) yellow
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <!DOCTYPE html> (d) <html>
  21. 21.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) quiz.html (c) news.html (d) games.html
  22. 22.True or false: <aside> holds a side box of tips. (a) True (b) False
  23. 23.True or false: p is an element selector. (a) False (b) True
  24. 24.♿ What does good colour contrast mean? (a) many bright colours (b) no colours at all (c) text stands out clearly (d) only red text
  25. 25.🔍 One closing tag is missing. Which one?
    <em>Our school trip</em>
    <i>Fun facts</i>
    <u>I love mangoes.
    (a) </i> (b) </p> (c) </u> (d) </em>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p>
  27. 27.True or false: to use a strong password is not safe. (a) True (b) False
  28. 28.🌈 Which hex code is blue? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #ffff00
  29. 29.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <h4>Hello, world!</h4>
  30. 30.🔐 Is riya2014 a strong or a weak password? (a) weak (b) strong
  31. 31.What does font-weight do? (a) makes letters bigger (b) sets the letter colour (c) makes the text bold (d) centres a heading
  32. 32.🌈 Which colour of light is strongest in rgb(36, 6, 206)? (a) green (b) blue (c) red
  33. 33.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 30px;
      border: 5px solid black;
      margin: 0px;
    }
  34. 34.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) test in a browser (c) publish it online (d) plan what to show
  35. 35.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  36. 36.True or false: HTML sets colours and fonts. (a) False (b) True
  37. 37.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>My best friend</h3>
    <h2>Cricket is fun.</h2>
    <h4>Fun facts</h4>
  38. 38.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Cascading Style Sheets (c) Colourful Site Styles (d) Creative Sheet System
  39. 39.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Orange</td></tr>
    </table>
  40. 40.True or false: in <img>, src sets how wide it is. (a) False (b) True

Answer key

  1. alt
  2. in the middle
  3. font-size
  4. </em>
  5. False
  6. href
  7. red
  8. #
  9. white
  10. 5
  11. makes a form box
  12. a line across the page
  13. child
  14. False
  15. the browser asks it
  16. Yes
  17. 9
  18. one
  19. yellow
  20. <!DOCTYPE html>
  21. news.html
  22. True
  23. True
  24. text stands out clearly
  25. </u>
  26. 4
  27. False
  28. #0000ff
  29. 2
  30. weak
  31. makes the text bold
  32. blue
  33. 120
  34. publish it online
  35. opens it in a new tab
  36. False
  37. 4
  38. Cascading Style Sheets
  39. 3
  40. False

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