← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 737 · 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) alt (b) height (c) width (d) src
  2. 2.True or false: “add alt text to images” helps everyone use the page. (a) False (b) True
  3. 3.🖌️ Which CSS property picks the font style? (a) text-align (b) background-color (c) font-family (d) font-size
  4. 4.True or false: <li> goes inside ul or ol. (a) False (b) True
  5. 5.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>The red kite</h3>
    <h3>The red kite</h3>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) width (c) dog.jpg (d) The full moon
  7. 7.True or false: p is an id selector. (a) False (b) True
  8. 8.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  10. 10.🔢 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
  11. 11.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) script.js (c) index.html
  12. 12.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) games.html (b) about.html (c) Contact us (d) quiz.html
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  14. 14.🖌️ Which CSS property makes the text bold? (a) color (b) font-weight (c) background-color (d) font-size
  15. 15.⚡ What does this code show?
    let name = "Riya";
    console.log("Hello, " + name + "!");
    (a) Riya (b) Hello, name! (c) Hello, Riya! (d) name
  16. 16.True or false: <input type="password"> is for an email address. (a) False (b) True
  17. 17.🔁 How many numbers does this code print?
    for (let i = 0; i < 7; i = i + 4) {
      console.log(i);
    }
  18. 18.True or false: HTML on its own can make headings. (a) False (b) True
  19. 19.🔍 One closing tag is missing. Which one?
    <i>Our school trip</i>
    <h1>My best friend</h1>
    <p>Good morning!
    (a) </i> (b) </b> (c) </h1> (d) </p>
  20. 20.🖌️ What colour are the letters?
    h2 {
      font-size: 12px;
      background-color: green;
      color: yellow;
      text-align: center;
    }
    (a) green (b) yellow (c) black
  21. 21.🧩 Which language lays out the page? (a) JavaScript (b) HTML (c) CSS
  22. 22.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  23. 23.✍️ CSS declarations go inside which brackets? (a) < > (b) [ ] (c) ( ) (d) { }
  24. 24.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Fun facts</p>
  25. 25.🔒 Is the connection to this address scrambled (encrypted)?
    http://learn.example.com/index.html
    (a) Yes (b) No
  26. 26.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) https://example.com (b) maths.html (c) contact.html (d) Play games
  27. 27.True or false: <a> goes in the head. (a) True (b) False
  28. 28.🌍 What is the domain name in this URL?
    https://www.example.net/about.html
    (a) /about.html (b) www.example.net (c) https (d) learn.example.com
  29. 29.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  30. 30.🌍 What is the protocol in this URL?
    https://www.example.net/games/chess.html
    (a) /games/chess.html (b) https (c) www.example.net (d) http
  31. 31.True or false: <tr> makes a heading cell. (a) True (b) False
  32. 32.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  33. 33.⚡ Which JavaScript word writes in the console? (a) if (b) let (c) alert() (d) console.log()
  34. 34.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 5px;
      border: 1px solid black;
      margin: 20px;
    }
  35. 35.True or false: <article> holds a news story. (a) True (b) False
  36. 36.Which of these is an empty tag? (a) <p> (b) <meta> (c) <title> (d) <h1>
  37. 37.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) hosts websites online (d) shows pages from the web
  38. 38.🎯 Which element does the selector .big style? (a) <li class="big"> (b) <div class="box"> (c) <li class="red"> (d) <li id="big">
  39. 39.True or false: <table> makes a heading cell. (a) False (b) True
  40. 40.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Rain today (c) Hello, world! (d) Cricket is fun.

Answer key

  1. alt
  2. True
  3. font-family
  4. True
  5. 3
  6. A happy dog
  7. False
  8. <!DOCTYPE html>
  9. 6
  10. you type the URL
  11. index.html
  12. quiz.html
  13. Yes
  14. font-weight
  15. Hello, Riya!
  16. False
  17. 2
  18. True
  19. </p>
  20. yellow
  21. CSS
  22. 4
  23. { }
  24. 3
  25. No
  26. contact.html
  27. False
  28. www.example.net
  29. an attribute
  30. https
  31. False
  32. href
  33. console.log()
  34. 242
  35. True
  36. <meta>
  37. hosts websites online
  38. <li class="big">
  39. False
  40. Hello, world!

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