← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 460 · 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.⚖️ What colour is the text of this element?
    <h1 class="note" id="logo">Hi</h1>
    CSS:
    h1 { color: red; }
    h1 { color: white; }
    (a) purple (b) white (c) orange (d) red
  2. 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
  3. 3.🧩 Which language makes a form box? (a) JavaScript (b) CSS (c) HTML
  4. 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.What is <input type="email"> for? (a) sends the form (b) lets you pick only one (c) is for one line of words (d) is for an email address
  6. 6.True or false: the browser stores the site’s files. (a) False (b) True
  7. 7.🔁 How many numbers does this code print?
    for (let i = 0; i < 19; i = i + 3) {
      console.log(i);
    }
  8. 8.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) fits every screen (d) never changes
  9. 9.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-start (c) flex-end (d) center
  10. 10.📊 Which tag makes one table row? (a) <caption> (b) <th> (c) <tr> (d) <table>
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  12. 12.🎯 Which element does the selector #logo style? (a) <span class="logo"> (b) <p class="box"> (c) <span id="logo"> (d) <span id="end">
  13. 13.🎯 Can many elements share the same class? (a) No (b) Yes
  14. 14.What does font-size do? (a) makes letters bigger (b) sets the letter colour (c) colours behind the text (d) makes the text bold
  15. 15.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  16. 16.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
  17. 17.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  18. 18.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
  19. 19.Which of these is margin? (a) a solid or dotted edge (b) the line round the box (c) space inside the border (d) the gap to other boxes
  20. 20.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  21. 21.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  22. 22.💪 Which justify-content value packs boxes at the end? (a) space-between (b) flex-end (c) flex-start (d) center
  23. 23.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  24. 24.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  25. 25.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) index.html (c) Match report (d) Cricket Club
  26. 26.True or false: <table> makes one table row. (a) True (b) False
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <i>Rain today</i>
    line 3: <u>My best friend</u>
    (a) line 1 (b) line 2 (c) line 3
  28. 28.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<header>”? (a) <nav> (b) <header>
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  30. 30.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="text">
      <input type="date">
      <input type="email">
      <input type="checkbox">
      <input type="submit" value="Send">
    </form>
  31. 31.True or false: score = score + 1; goes in script.js. (a) True (b) False
  32. 32.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
  33. 33.What is <input type="submit"> for? (a) sends the form (b) hides what you type (c) lets you pick only one (d) takes only numbers
  34. 34.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
  35. 35.True or false: <li> is one item of a list. (a) True (b) False
  36. 36.🎯 Which element does the selector h2 style? (a) <span id="intro"> (b) <h2 class="box"> (c) <div class="box"> (d) <li>
  37. 37.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Sky is blue</p>
  39. 39.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + 5;
    }
    console.log(total);
  40. 40.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 120px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 40px wide (no margins).

Answer key

  1. white
  2. 6
  3. HTML
  4. an opening tag
  5. is for an email address
  6. False
  7. 7
  8. fits every screen
  9. flex-start
  10. <tr>
  11. 400
  12. <span id="logo">
  13. Yes
  14. makes letters bigger
  15. 2
  16. strong
  17. href
  18. 78
  19. the gap to other boxes
  20. Yes
  21. opens it in a new tab
  22. flex-end
  23. False
  24. to leave notes
  25. Cricket Club
  26. False
  27. line 1
  28. <header>
  29. <h1>
  30. 6
  31. True
  32. True
  33. sends the form
  34. turns HTML into a page
  35. True
  36. <h2 class="box">
  37. <li>
  38. 3
  39. 35
  40. 40

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