← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 61 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  2. 2.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  4. 4.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Rivers flow<br>Birds sing<br>Kites fly high</p>
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>I love mangoes.</h2>
    <h4>Good morning!</h4>
    <h3>The red kite</h3>
  7. 7.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
  8. 8.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  9. 9.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  10. 10.Which of these is true of a web server? (a) has an address bar (b) stores a website’s files (c) shows line numbers (d) shows pages from the web
  11. 11.True or false: <p> goes in the head. (a) True (b) False
  12. 12.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  13. 13.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  15. 15.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h1>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  17. 17.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) about.html (c) School news (d) quiz.html
  18. 18.🔍 One closing tag is missing. Which one?
    <i>Our school trip</i>
    <u>The red kite</u>
    <p>Cricket is fun.
    (a) </u> (b) </i> (c) </strong> (d) </p>
  19. 19.True or false: in <img>, width shows if the image fails. (a) True (b) False
  20. 20.Which of these goes in the body? (a) <style> (b) <h1> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  21. 21.🔍 One closing tag is missing. Which one?
    <em>Our school trip</em>
    <p>Cricket is fun.
    <h1>I love mangoes.</h1>
    (a) </p> (b) </u> (c) </em> (d) </h1>
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) My pets (b) Fun facts (c) I love mangoes. (d) Hello, world!
  23. 23.True or false: a code editor is where we type code. (a) True (b) False
  24. 24.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) is where we type code
  25. 25.Which of these has a closing tag? (a) <br> (b) <li> (c) <hr> (d) <input>
  26. 26.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  27. 27.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>
  28. 28.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
  29. 29.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <h6> (d) <br>
  30. 30.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  31. 31.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  32. 32.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) games.html (b) Art corner (c) href (d) School news
  33. 33.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  34. 34.Which of these is an opening tag? (a) </p> (b) </li> (c) </b> (d) <body>
  35. 35.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite</strong>
    line 2: <h2>My best friend</h2>
    line 3: <u>Rain today
    (a) line 1 (b) line 3 (c) line 2
  37. 37.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  38. 38.True or false: <meta> is an empty tag. (a) False (b) True
  39. 39.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  40. 40.Which of these is an opening tag? (a) </li> (b) </b> (c) <p> (d) </h1>

Answer key

  1. element
  2. in the head
  3. A happy dog
  4. cake.jpg
  5. 5
  6. 4
  7. <!DOCTYPE html>
  8. in the same tab
  9. Yes
  10. stores a website’s files
  11. False
  12. <img>
  13. starts a new line
  14. 1
  15. <h1>
  16. <h1>
  17. quiz.html
  18. </p>
  19. False
  20. <h1>
  21. </p>
  22. I love mangoes.
  23. True
  24. is where we type code
  25. <li>
  26. Yes
  27. </h3>
  28. src
  29. <h1>
  30. <li>
  31. to leave notes
  32. Art corner
  33. <h1>
  34. <body>
  35. alt
  36. line 3
  37. opens it in a new tab
  38. True
  39. a web browser
  40. <p>

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