← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 386 · 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 word runs code only when something is true? (a) log (b) let (c) for (d) if
  2. 2.True or false: <header> holds the logo and title. (a) True (b) False
  3. 3.🌈 Which colour is #00ffff? (a) cyan (b) black (c) bright green (d) magenta
  4. 4.⚡ What does alert() show? (a) a new tab (b) a picture (c) a pop-up box (d) a table
  5. 5.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  6. 6.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>The red kite</p>
  8. 8.True or false: <input type="date"> picks a day. (a) False (b) True
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
  10. 10.🎯 Which CSS selector matches this element?
    <h1 class="big" id="intro">Hello</h1>
    (a) .intro (b) #big (c) h1 (d) .red
  11. 11.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 300px;
      padding: 10px;
      border: 1px solid black;
      margin: 20px;
    }
  12. 12.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  13. 13.📝 Which input type takes only numbers? (a) checkbox (b) password (c) text (d) number
  14. 14.⚡ Which JavaScript word makes a new variable? (a) alert() (b) console.log() (c) if (d) let
  15. 15.Which of these is safe to do online? (a) post your home address (b) ask before downloading (c) download from pop-ups (d) share your password
  16. 16.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  17. 17.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) Maths fun (c) Art corner (d) href
  18. 18.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
  19. 19.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
  20. 20.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  21. 21.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  22. 22.True or false: in <img>, src tells which image to load. (a) True (b) False
  23. 23.📝 Which input type is for an email address? (a) text (b) checkbox (c) email (d) radio
  24. 24.🎯 Which CSS selector matches this element?
    <div class="note" id="main">Hello</div>
    (a) #main (b) #logo (c) .big (d) #note
  25. 25.True or false: the server sends the page back. (a) False (b) True
  26. 26.🔁 What does this code print?
    let age = 24;
    if (age > 39) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  27. 27.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  28. 28.🎯 Which sign starts a class selector? (a) # (b) @ (c) . (d) &
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts
    line 2: <p>Hello, world!</p>
    line 3: <strong>Rain today</strong>
    (a) line 3 (b) line 1 (c) line 2
  30. 30.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h1> → <h1>
    (a) No (b) Yes
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width
  32. 32.🧩 Which language rounds box corners? (a) HTML (b) JavaScript (c) CSS
  33. 33.True or false: <input type="checkbox"> lets you tick many. (a) True (b) False
  34. 34.🔢 When you open a web page, what comes right after “DNS finds the server”? (a) the browser shows it (b) you type the URL (c) the browser asks it (d) the server sends files
  35. 35.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Fun facts</h2>
    <h2>Fun facts</h2>
    <p>The red kite</p>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
  36. 36.Which of these has a closing tag? (a) <ul> (b) <meta> (c) <br> (d) <input>
  37. 37.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 7;
    console.log(x + y);
    (a) 17 (b) Error (c) 8
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  39. 39.⚡ What does this code show?
    let name = "Riya";
    alert("Well done, " + name + "!");
    (a) name (b) Well done, name! (c) Well done, Riya! (d) Riya
  40. 40.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).

Answer key

  1. if
  2. True
  3. cyan
  4. a pop-up box
  5. href
  6. in the body
  7. 2
  8. True
  9. <h6>
  10. h1
  11. 322
  12. False
  13. number
  14. let
  15. ask before downloading
  16. 4
  17. Maths fun
  18. the later one
  19. element
  20. Yes
  21. 3
  22. True
  23. email
  24. #main
  25. True
  26. child
  27. in the head
  28. .
  29. line 1
  30. Yes
  31. Birthday cake
  32. CSS
  33. True
  34. the browser asks it
  35. 3
  36. <ul>
  37. 17
  38. 300
  39. Well done, Riya!
  40. 20

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