← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 394 · 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 number does this code print?
    let books = 23;
    books = books + 3;
    books = books - 10;
    console.log(books);
  2. 2.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  3. 3.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 5px;
      border: 1px solid black;
      margin: 15px;
    }
  4. 4.🔁 Which word runs code only when something is true? (a) let (b) log (c) for (d) if
  5. 5.✍️ Which sign ends each CSS declaration? (a) ; (b) . (c) , (d) :
  6. 6.Which of these is true of <main>? (a) sits at the very top (b) sits at the bottom (c) holds copyright notes (d) holds the main content
  7. 7.True or false: “add alt text to images” helps everyone use the page. (a) True (b) False
  8. 8.📊 In a table, which tag is a row? (a) <tr> (b) <th> (c) <td> (d) <tb>
  9. 9.Which of these does HTML do? (a) counts down a timer (b) sets colours and fonts (c) adds space around boxes (d) makes a form box
  10. 10.True or false: the server sends the page back. (a) False (b) True
  11. 11.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) Fun facts (c) Our school trip
  12. 12.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) close it, tell an adult (c) share it with friends (d) type the password
  14. 14.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
  15. 15.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) href (c) contact.html (d) Play games
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  17. 17.True or false: a code editor shows pages from the web. (a) False (b) True
  18. 18.⚡ What number does this code print?
    let a = 42;
    let b = 25;
    console.log(a - b);
  19. 19.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  21. 21.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  22. 22.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) hosts websites online (d) turns HTML into a page
  23. 23.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the later one (c) the shorter one (d) neither
  24. 24.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <title> (d) <label>
  25. 25.🔒 Is the connection to this address scrambled (encrypted)?
    http://school.example.in/maths/tables.html
    (a) Yes (b) No
  26. 26.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="fruit"> Banana
      <input type="radio" name="fruit"> Guava
      <input type="radio" name="fruit"> Papaya
      <input type="radio" name="fruit"> Litchi
      <input type="radio" name="fruit"> Mango
    </form>
  27. 27.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  29. 29.⚖️ What colour is the text of this element?
    <p class="big" id="hero">Hi</p>
    CSS:
    p { color: white; }
    .big { color: orange; }
    (a) orange (b) purple (c) white (d) blue
  30. 30.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.True or false: a web browser answers page requests. (a) True (b) False
  32. 32.Which of these does HTML do? (a) counts down a timer (b) changes the text size (c) changes the page live (d) gives the page structure
  33. 33.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  34. 34.✍️ What is the selector in this CSS rule?
    h1 {
      padding: 8px;
      color: red;
      background-color: yellow;
      font-size: 20px;
    }
    (a) red (b) h1 (c) padding (d) p
  35. 35.True or false: to click prize links is not safe. (a) False (b) True
  36. 36.🎨 Which attribute adds CSS inside one tag? (a) href (b) alt (c) style (d) src
  37. 37.🚀 Should file names have spaces, like my page.html? (a) No (b) Yes
  38. 38.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My pets</p>
    <p>Hello, world!</p>
    <h4>Rain today</h4>
    <p>Hello, world!</p>
  39. 39.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>The red kite</h2>
    <p>The red kite</p>
  40. 40.True or false: <a href="a.html">Go</a> goes in script.js. (a) False (b) True

Answer key

  1. 16
  2. <h2>
  3. 102
  4. if
  5. ;
  6. holds the main content
  7. True
  8. <tr>
  9. makes a form box
  10. True
  11. Our school trip
  12. has a closing tag
  13. close it, tell an adult
  14. to leave notes
  15. Play games
  16. <h1>
  17. False
  18. 17
  19. a web server
  20. Yes
  21. <!DOCTYPE html>
  22. turns HTML into a page
  23. the later one
  24. <label>
  25. No
  26. 1
  27. a closing tag
  28. <ol>
  29. orange
  30. an opening tag
  31. False
  32. gives the page structure
  33. <h5>
  34. h1
  35. True
  36. style
  37. No
  38. 2
  39. 2
  40. False

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