← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 992 · 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: a code editor answers page requests. (a) False (b) True
  2. 2.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Orange</td></tr>
    </table>
  3. 3.Which of these is not safe to do online? (a) ask before downloading (b) log out on shared PCs (c) use a strong password (d) put secrets in comments
  4. 4.🔢 To build and share your first web page, which comes FIRST? (a) write the HTML (b) publish it online (c) add CSS styles (d) plan what to show
  5. 5.True or false: the content is the gap round content. (a) True (b) False
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <body> (c) <!DOCTYPE html> (d) <head>
  7. 7.💪 Which flexbox property lines boxes up across? (a) display: flex (b) gap (c) justify-content (d) align-items
  8. 8.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) style.css (c) script.js (d) notes.txt
  9. 9.⚡ What number does this code print?
    let a = 36;
    let b = 15;
    console.log(a - b);
  10. 10.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
  11. 11.🔢 When you open a web page, which comes first: “the server sends files” or “you type the URL”? (a) you type the URL (b) the server sends files
  12. 12.🌍 What does a web address (URL) tell the browser? (a) where the page is (b) the page colour (c) how old you are (d) your password
  13. 13.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  14. 14.🌍 Which one is the page’s address? (a) the server (b) the browser (c) the URL (d) HTTPS
  15. 15.True or false: <table> holds the whole table. (a) True (b) False
  16. 16.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="colour"> Red
      <input type="radio" name="colour"> Pink
      <input type="radio" name="colour"> Orange
    </form>
  17. 17.⚡ What number does this code print?
    let apples = 28;
    apples = apples + 9;
    apples = apples - 8;
    console.log(apples);
  18. 18.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
  19. 19.📦 In the box model, which part is the gap round content? (a) content (b) border (c) padding (d) margin
  20. 20.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + i;
    }
    console.log(total);
  21. 21.✍️ What is the selector in this CSS rule?
    #top {
      font-size: 20px;
      margin: 10px;
      border: 2px solid;
      color: red;
    }
    (a) font-size (b) li (c) 10px (d) #top
  22. 22.⚡ What does this code show?
    let name = "Zoya";
    console.log("Hi, " + name + "!");
    (a) Zoya (b) Hi, name! (c) Hi, Zoya! (d) name
  23. 23.✍️ What value is given to background-color in this rule?
    .note {
      background-color: yellow;
      text-align: center;
      color: red;
      border: 2px solid;
    }
    (a) 10px (b) 8px (c) yellow (d) background-color
  24. 24.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/games/chess.html
    (a) Yes (b) No
  25. 25.🔢 When you open a web page, which comes first: “DNS finds the server” or “the browser asks it”? (a) DNS finds the server (b) the browser asks it
  26. 26.Which of these is true of <header>? (a) sits at the bottom (b) holds extra side notes (c) holds the logo and title (d) holds a side box of tips
  27. 27.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  28. 28.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  30. 30.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Rain today</h2>
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
  31. 31.🎯 Which sign starts a class selector? (a) @ (b) # (c) & (d) .
  32. 32.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #000000
  33. 33.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    (a) Rain today (b) I love mangoes. (c) My best friend (d) Our school trip
  34. 34.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      text-align: center;
      width: 300px;
    }
  35. 35.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  36. 36.⚖️ What colour is the text of this element?
    <p class="box" id="top">Hi</p>
    CSS:
    p { color: green; }
    #top { color: red; }
    (a) blue (b) red (c) green (d) purple
  37. 37.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) cake.jpg (b) map.png (c) A red kite (d) kite.png
  38. 38.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
  39. 39.💪 Which flexbox property picks row or column? (a) align-items (b) flex-direction (c) display: flex (d) justify-content
  40. 40.True or false: <input type="number"> takes only numbers. (a) False (b) True

Answer key

  1. False
  2. 2
  3. put secrets in comments
  4. plan what to show
  5. False
  6. <!DOCTYPE html>
  7. align-items
  8. script.js
  9. 21
  10. 2
  11. you type the URL
  12. where the page is
  13. as one space
  14. the URL
  15. True
  16. 1
  17. 29
  18. easy to read
  19. padding
  20. 10
  21. #top
  22. Hi, Zoya!
  23. yellow
  24. Yes
  25. DNS finds the server
  26. holds the logo and title
  27. <li>
  28. for
  29. 150
  30. 3
  31. .
  32. #ff0000
  33. My best friend
  34. 2
  35. <a href="about.html">
  36. red
  37. kite.png
  38. 4
  39. flex-direction
  40. True

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