← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 144 · 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 CSS property sets the letter colour? (a) font-size (b) background-color (c) font-family (d) color
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing</p>
  3. 3.Which of these is true of <nav>? (a) holds the menu of links (b) holds one blog post (c) holds a side box of tips (d) holds the main content
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  5. 5.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
  6. 6.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  7. 7.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #00ffff
  8. 8.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Roses are red<br>Stars shine</p>
  10. 10.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  12. 12.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Cricket is fun.</h4>
    <p>I love mangoes.</p>
  13. 13.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is free (b) the site is a game (c) the site is fast (d) the data is scrambled
  14. 14.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  15. 15.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h1>Good morning!
    <h3>My best friend</h3>
    (a) </h1> (b) </p> (c) </h3> (d) </h2>
  16. 16.🔢 When you open a web page, which comes LAST? (a) DNS finds the server (b) the browser shows it (c) the server sends files (d) you type the URL
  17. 17.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
  18. 18.What does justify-content: space-between do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  19. 19.⚡ What number does this code print?
    let a = 17;
    let b = 2;
    console.log(a + b);
  20. 20.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 5px;
      border: 4px solid black;
      margin: 20px;
    }
  21. 21.🧩 Which language shows a pop-up message? (a) JavaScript (b) CSS (c) HTML
  22. 22.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  23. 23.🔍 Which is the odd one out? (a) counts down a timer (b) reacts to a button click (c) lays out the page (d) changes the page live
  24. 24.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
  25. 25.✍️ What value is given to font-style in this rule?
    p {
      font-style: italic;
      border: 2px solid;
    }
    (a) red (b) font-style (c) 20px (d) italic
  26. 26.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) contact.html (c) games.html (d) about.html
  27. 27.🌈 Which colour of light is strongest in rgb(112, 32, 222)? (a) green (b) blue (c) red
  28. 28.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.🧭 Which semantic tag holds the logo and title? (a) <header> (b) <nav> (c) <article> (d) <footer>
  30. 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) bright green (d) red
  31. 31.What does justify-content: flex-end do? (a) packs boxes at the start (b) puts boxes in the middle (c) equal gaps, none at ends (d) packs boxes at the end
  32. 32.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  33. 33.🧩 Which language reacts to a button click? (a) JavaScript (b) CSS (c) HTML
  34. 34.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) let (d) else
  35. 35.🌍 What is the protocol in this URL?
    https://kids.example.org/art/gallery.html
    (a) https (b) kids.example.org (c) /art/gallery.html (d) http
  36. 36.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Kabaddi
    </form>
  37. 37.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 2;
    }
    console.log(total);
  38. 38.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 120px;
      padding: 15px;
      border: 4px solid black;
      margin: 0px;
    }
  39. 39.True or false: “link text “click here”” helps everyone use the page. (a) False (b) True
  40. 40.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */

Answer key

  1. color
  2. 2
  3. holds the menu of links
  4. 300
  5. a web server
  6. an empty tag
  7. #00ff00
  8. Yes
  9. 4
  10. <h6>
  11. Yes
  12. 2
  13. the data is scrambled
  14. <h5>
  15. </h1>
  16. the browser shows it
  17. alt
  18. equal gaps, none at ends
  19. 19
  20. 88
  21. JavaScript
  22. 1
  23. lays out the page
  24. element
  25. italic
  26. games.html
  27. blue
  28. in the head
  29. <header>
  30. blue
  31. packs boxes at the end
  32. href
  33. JavaScript
  34. for
  35. https
  36. 1
  37. 16
  38. 158
  39. False
  40. -->

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