← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 510 · 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 of these is safe to do online? (a) download from pop-ups (b) use a nickname in games (c) share your OTP (d) put secrets in comments
  2. 2.True or false: <ol> goes inside ul or ol. (a) False (b) True
  3. 3.True or false: a code editor shows pages from the web. (a) True (b) False
  4. 4.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
  5. 5.🔢 To build and share your first web page, which comes first: “test in a browser” or “plan what to show”? (a) test in a browser (b) plan what to show
  6. 6.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 160px;
      padding: 30px;
      border: 1px solid black;
      margin: 10px;
    }
  7. 7.🧩 Which language adds space around boxes? (a) JavaScript (b) CSS (c) HTML
  8. 8.🌍 Which one scrambles data on its way? (a) the URL (b) HTTPS (c) the server (d) the browser
  9. 9.🧭 How many <main> parts should a page have? (a) three (b) one (c) ten (d) none
  10. 10.Which of these is a weak password? (a) S0lar!Pen#8 (b) Mango#Kite29! (c) Chai$Cup_19x (d) qwerty
  11. 11.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  12. 12.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + i;
    }
    console.log(total);
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  15. 15.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  16. 16.⚡ Where does console.log() show its output? (a) on the printer (b) in the console (c) on the title bar (d) in the address bar
  17. 17.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  18. 18.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Grapes</td></tr>
    </table>
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  20. 20.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 150px;
      padding: 5px;
      border: 5px solid black;
      margin: 20px;
    }
  21. 21.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
  22. 22.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 6; i++) {
      console.log("Hi");
    }
  23. 23.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
  24. 24.💪 Which flexbox property lines boxes up across? (a) align-items (b) flex-direction (c) gap (d) display: flex
  25. 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  26. 26.♿ A part of the page is under a <h5> heading. Which tag should its sub-heading use? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  27. 27.True or false: <ol> is an ordered list. (a) True (b) False
  28. 28.What does justify-content: center do? (a) puts boxes in the middle (b) packs boxes at the start (c) packs boxes at the end (d) equal gaps, none at ends
  29. 29.🎯 Which sign starts an id selector? (a) . (b) & (c) @ (d) #
  30. 30.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  31. 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  32. 32.🌍 What is the protocol in this URL?
    https://www.example.net/about.html
    (a) https (b) http (c) /about.html (d) www.example.net
  33. 33.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h3> → <h3>
    (a) No (b) Yes
  34. 34.🌍 What finds the server for a domain name like example.com? (a) HTML (b) CSS (c) DNS (d) alt
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  36. 36.✍️ In color: blue; which part is the value? (a) ; (b) : (c) blue (d) color
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h5>
  38. 38.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Guava</td><td>Orange</td><td>Jamun</td></tr>
    </table>
  39. 39.True or false: <p> is an empty tag. (a) True (b) False
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) width (c) fort.jpg (d) A tiger asleep

Answer key

  1. use a nickname in games
  2. False
  3. False
  4. src
  5. plan what to show
  6. 222
  7. CSS
  8. HTTPS
  9. one
  10. qwerty
  11. an attribute
  12. 10
  13. 350
  14. red
  15. a web browser
  16. in the console
  17. opens it in a new tab
  18. 3
  19. 1
  20. 210
  21. the viewport meta tag
  22. 5
  23. 3
  24. align-items
  25. No
  26. <h6>
  27. True
  28. puts boxes in the middle
  29. #
  30. F
  31. <!DOCTYPE html>
  32. https
  33. No
  34. DNS
  35. 2
  36. blue
  37. <h6>
  38. 2
  39. False
  40. An old fort

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