← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 369 · 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.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  2. 2.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <p>Hello, world!</p>
    <strong>Our school trip
    (a) </strong> (b) </em> (c) </i> (d) </p>
  3. 3.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My pets</h3>
    <p>Rain today</p>
  4. 4.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) sends pages over the net (d) opens web pages for us
  5. 5.True or false: <b> is an empty tag. (a) False (b) True
  6. 6.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) href (c) Take the quiz (d) Play games
  7. 7.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My best friend</p>
    <p>Rain today</p>
  8. 8.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  9. 9.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
  10. 10.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  11. 11.Which of these is an opening tag? (a) <p> (b) </body> (c) </title> (d) </li>
  12. 12.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Cricket is fun. (b) Fun facts (c) The red kite (d) My best friend
  13. 13.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    (a) Good morning! (b) Rain today (c) My best friend (d) Hello, world!
  14. 14.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h1>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <b>The red kite
    line 2: <p>I love mangoes.</p>
    line 3: <h2>My pets</h2>
    (a) line 1 (b) line 2 (c) line 3
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  18. 18.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Modern (d) Mouse
  19. 19.Which of these is true of a code editor? (a) hosts websites online (b) is where we type code (c) has an address bar (d) shows pages from the web
  20. 20.True or false: HTML on its own cannot make a form. (a) True (b) False
  21. 21.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) contact.html (b) https://example.com (c) About us (d) about.html
  23. 23.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
  25. 25.True or false: <title> goes in the head. (a) True (b) False
  26. 26.📋 What number does the browser show next to “Litchi”?
    <ol start="3">
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  27. 27.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) </h2> (c) <h2/> (d) <\h2>
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  30. 30.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  32. 32.True or false: in <img>, width sets how wide it is. (a) True (b) False
  33. 33.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h6>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  34. 34.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  35. 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  36. 36.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  37. 37.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>Hello, world!</h3>
    <h2>Fun facts</h2>
  38. 38.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  39. 39.🔗 Where does this link open?
    <a href="https://example.com">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  40. 40.True or false: <ul> goes in the body. (a) False (b) True

Answer key

  1. <!--
  2. </strong>
  3. 2
  4. sends pages over the net
  5. False
  6. Take the quiz
  7. 1
  8. <ol>
  9. 2
  10. <a href="about.html">
  11. <p>
  12. Fun facts
  13. My best friend
  14. height
  15. <h6>
  16. line 1
  17. element
  18. Markup
  19. is where we type code
  20. False
  21. in the head
  22. about.html
  23. a code editor
  24. 1
  25. True
  26. 6
  27. </h2>
  28. 2
  29. Yes
  30. <img>
  31. 150
  32. True
  33. <h1>
  34. a web browser
  35. a slash /
  36. False
  37. 3
  38. <!DOCTYPE html>
  39. in the same tab
  40. True

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