← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 428 · 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 language rounds box corners? (a) HTML (b) JavaScript (c) CSS
  2. 2.🌗 Is dark grey on white easy or hard to read? (a) hard to read (b) easy to read
  3. 3.🌍 What is the path in this URL?
    http://www.example.com/games/chess.html
    (a) www.example.com (b) /about.html (c) /games/chess.html (d) http
  4. 4.🖌️ What colour are the letters?
    h2 {
      color: white;
      text-align: right;
      background-color: yellow;
      font-size: 12px;
    }
    (a) yellow (b) white (c) black
  5. 5.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) let (c) for (d) if
  6. 6.🚀 Which file should this code go in: let score = 0; (a) style.css (b) script.js (c) index.html
  7. 7.🌈 Which colour is #00ff00? (a) black (b) red (c) bright green (d) yellow
  8. 8.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) map.png (c) A tiger asleep (d) kite.png
  9. 9.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 180px;
      padding: 30px;
      border: 5px solid black;
      margin: 5px;
    }
  10. 10.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  11. 11.True or false: a web browser shows pages from the web. (a) False (b) True
  12. 12.⚖️ What colour is the text of this element?
    <h2 class="big" id="intro">Hi</h2>
    CSS:
    .big { color: yellow; }
    .big { color: blue; }
    (a) blue (b) yellow (c) red (d) orange
  13. 13.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  14. 14.⚖️ What colour is the text of this element?
    <p class="red" id="top">Hi</p>
    CSS:
    #top { color: yellow; }
    .red { color: orange; }
    p { color: black; }
    (a) purple (b) yellow (c) orange (d) black
  15. 15.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  16. 16.⚡ Which JavaScript word runs code when true? (a) for (b) alert() (c) let (d) if
  17. 17.⚖️ What colour is the text of this element?
    <p class="red" id="intro">Hi</p>
    CSS:
    p { color: black; }
    p { color: blue; }
    (a) blue (b) black (c) purple (d) red
  18. 18.🌍 What is the protocol in this URL?
    http://www.example.com/maths/tables.html
    (a) https (b) www.example.com (c) http (d) /maths/tables.html
  19. 19.⚖️ What colour is the text of this element?
    <h1 class="menu" id="logo">Hi</h1>
    CSS:
    .menu { color: white; }
    .menu { color: red; }
    (a) orange (b) yellow (c) red (d) white
  20. 20.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  22. 22.True or false: <a> goes in the body. (a) True (b) False
  23. 23.Which of these has a closing tag? (a) <input> (b) <img> (c) <h1> (d) <meta>
  24. 24.📊 Where do <td> cells go? (a) inside a <tr> (b) inside the <head> (c) inside a <li> (d) inside a <p>
  25. 25.True or false: console.log(5 + 2); goes in script.js. (a) False (b) True
  26. 26.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 250px;
      padding: 5px;
      border: 4px solid black;
      margin: 10px;
    }
  27. 27.True or false: p is an element selector. (a) False (b) True
  28. 28.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  30. 30.🔁 How many numbers does this code print?
    for (let i = 0; i < 17; i = i + 3) {
      console.log(i);
    }
  31. 31.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  32. 32.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  33. 33.🔁 What does this code print?
    let score = 46;
    if (score > 24) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  34. 34.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>The red kite</h3>
    <h2>Hello, world!</h2>
    <h3>My best friend</h3>
  35. 35.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) href (c) School news (d) Art corner
  36. 36.🛡️ Before typing a password on a site, check the address starts with ___. (a) http (b) ftp (c) https (d) www
  37. 37.True or false: <li> goes inside ul or ol. (a) True (b) False
  38. 38.True or false: <td> makes one table row. (a) True (b) False
  39. 39.True or false: the URL stores the site’s files. (a) False (b) True
  40. 40.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) test in a browser (b) write the HTML (c) add CSS styles (d) publish it online

Answer key

  1. CSS
  2. easy to read
  3. /games/chess.html
  4. white
  5. let
  6. script.js
  7. bright green
  8. tiger.jpg
  9. 250
  10. 3
  11. True
  12. blue
  13. starts a new line
  14. yellow
  15. bus.jpg
  16. if
  17. blue
  18. http
  19. red
  20. to leave notes
  21. 400
  22. True
  23. <h1>
  24. inside a <tr>
  25. True
  26. 268
  27. True
  28. in the head
  29. 100
  30. 6
  31. a web server
  32. Yes
  33. You win
  34. 4
  35. Art corner
  36. https
  37. True
  38. False
  39. False
  40. write the HTML

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