← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 114 · 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.True or false: <ol> lists steps in order. (a) True (b) False
  2. 2.True or false: <input> is an empty tag. (a) True (b) False
  3. 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
  5. 5.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  7. 7.True or false: <ul> is an empty tag. (a) False (b) True
  8. 8.True or false: <br> has a closing tag. (a) True (b) False
  9. 9.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  10. 10.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  11. 11.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png
  12. 12.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <h2>Cricket is fun.</h2>
  13. 13.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <strong>My best friend
    <p>Hello, world!</p>
    (a) </b> (b) </p> (c) </u> (d) </strong>
  14. 14.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) href (d) Play games
  15. 15.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  16. 16.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  17. 17.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
  18. 18.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
  19. 19.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  20. 20.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) contact.html (b) Take the quiz (c) href (d) School news
  21. 21.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) is where we type code (d) turns HTML into a page
  22. 22.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) games.html
  23. 23.True or false: in <img>, src is read by screen readers. (a) False (b) True
  24. 24.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  25. 25.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  26. 26.True or false: <li> is an empty tag. (a) False (b) True
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) https://example.com (c) Contact us (d) maths.html
  28. 28.Which of these is true of a web server? (a) opens web pages for us (b) is where we type code (c) saves our .html files (d) stores a website’s files
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>Fun facts</p>
  30. 30.True or false: a web server shows pages from the web. (a) True (b) False
  31. 31.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  32. 32.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  33. 33.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  34. 34.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  35. 35.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  36. 36.True or false: <ol> is an unordered list. (a) False (b) True
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.
    line 2: <u>My best friend</u>
    line 3: <h1>Fun facts</h1>
    (a) line 3 (b) line 2 (c) line 1
  38. 38.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <\strong> (c) <strong/> (d) <strong>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  40. 40.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line

Answer key

  1. True
  2. True
  3. an opening tag
  4. True
  5. <ol>
  6. 3
  7. False
  8. False
  9. <a>
  10. in the body
  11. fort.jpg
  12. 3
  13. </strong>
  14. Take the quiz
  15. <!--
  16. Yes
  17. src
  18. Markup
  19. 3
  20. School news
  21. is where we type code
  22. Take the quiz
  23. False
  24. href
  25. the body
  26. False
  27. contact.html
  28. stores a website’s files
  29. 1
  30. False
  31. <ul>
  32. bullets
  33. True
  34. False
  35. 3
  36. False
  37. line 1
  38. </strong>
  39. A tiger asleep
  40. starts a new line

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