← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 126 · 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 input type sends the form? (a) text (b) date (c) submit (d) checkbox
  2. 2.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  3. 3.🔁 What does this code print?
    let marks = 11;
    if (marks > 39) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  4. 4.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 15px;
      border: 2px solid black;
      margin: 5px;
    }
  5. 5.True or false: a code editor is where we type code. (a) True (b) False
  6. 6.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
  7. 7.📝 Which input type lets you pick only one? (a) number (b) submit (c) email (d) radio
  8. 8.📱 What does a media query check? (a) the battery level (b) the screen width (c) the page title (d) the time of day
  9. 9.🖌️ What colour are the letters?
    li {
      color: red;
      text-align: right;
      font-size: 40px;
      background-color: orange;
    }
    (a) red (b) orange (c) black
  10. 10.🧭 Which semantic tag holds the main content? (a) <article> (b) <header> (c) <main> (d) <footer>
  11. 11.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  12. 12.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Rain today</h2>
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <h2>Hello, world!</h2>
  13. 13.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 230px;
      padding: 5px;
      border: 1px solid black;
      margin: 0px;
    }
  14. 14.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  15. 15.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  17. 17.🌍 What is the protocol in this URL?
    http://www.example.net/about.html
    (a) http (b) /about.html (c) www.example.net (d) https
  18. 18.🎯 Which sign starts an id selector? (a) & (b) @ (c) # (d) .
  19. 19.🌈 Which colour of light is strongest in rgb(189, 28, 44)? (a) red (b) green (c) blue
  20. 20.⚡ What number does this code print?
    let a = 5;
    let b = 4;
    console.log(a * b);
  21. 21.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  22. 22.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  23. 23.🚀 Which file should this code go in: alert(score); (a) script.js (b) style.css (c) index.html
  24. 24.🔁 What does this code print?
    let temp = 6;
    if (temp > 37) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  25. 25.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  27. 27.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  28. 28.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  29. 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  30. 30.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  31. 31.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  32. 32.🎨 A CSS file usually ends with which extension? (a) .js (b) .html (c) .css (d) .png
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  34. 34.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) white
  35. 35.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) style.css (c) index.html
  36. 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  37. 37.🔁 What does this code print?
    let temp = 38;
    if (temp > 10) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  38. 38.💬 Does the browser show comments on the page? (a) Yes (b) No
  39. 39.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <caption> (d) <tr>
  40. 40.🔁 Which word runs code only when something is true? (a) let (b) if (c) for (d) log

Answer key

  1. submit
  2. True
  3. Try again
  4. 104
  5. True
  6. .html
  7. radio
  8. the screen width
  9. red
  10. <main>
  11. Yes
  12. 4
  13. 242
  14. in the same tab
  15. a closing tag
  16. No
  17. http
  18. #
  19. red
  20. 20
  21. an element selector
  22. <img>
  23. script.js
  24. Cool
  25. in the head
  26. 3
  27. <h1>
  28. False
  29. F
  30. <ul>
  31. an id selector
  32. .css
  33. 4
  34. blue
  35. index.html
  36. <!DOCTYPE html>
  37. Hot
  38. No
  39. <caption>
  40. if

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