← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 814 · 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.🔍 Which is the odd one out? (a) hosts websites online (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
  2. 2.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i> (c) <i/> (d) <\i>
  3. 3.🖼️ 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) A tiger asleep (c) fort.jpg (d) width
  4. 4.🔗 Where does this link open?
    <a href="news.html">Play games</a>
    (a) in a new tab (b) in the same tab
  5. 5.Which of these is an empty tag? (a) <hr> (b) <p> (c) <ul> (d) <h1>
  6. 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) I love mangoes. (c) Rain today
  8. 8.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  9. 9.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Good morning!</strong>
    <p>Rain today</p>
    <h1>The red kite
    (a) </small> (b) </strong> (c) </p> (d) </h1>
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  13. 13.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  14. 14.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  15. 15.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  16. 16.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  17. 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  18. 18.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) shows pages from the web (d) sends pages over the net
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <b>Rain today</b>
    line 3: <h1>The red kite
    (a) line 2 (b) line 3 (c) line 1
  20. 20.True or false: <img> goes in the head. (a) True (b) False
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) We won by 5 runs. (c) Space Facts (d) Match report
  22. 22.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  24. 24.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  25. 25.🔠 Are headings shown in bold by default? (a) No (b) Yes
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
  27. 27.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </head> (d) </html>
  28. 28.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) Our school trip (c) Fun facts (d) My pets
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  30. 30.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  31. 31.🔍 One closing tag is missing. Which one?
    <i>My best friend</i>
    <em>Rain today
    <h1>Good morning!</h1>
    (a) </em> (b) </h1> (c) </p> (d) </i>
  32. 32.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows pages from the web (d) hosts websites online
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  34. 34.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  35. 35.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) turns HTML into a page (d) saves our .html files
  36. 36.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  37. 37.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  38. 38.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  39. 39.🔍 One closing tag is missing. Which one?
    <i>Good morning!</i>
    <h3>My pets
    <em>Cricket is fun.</em>
    (a) </em> (b) </b> (c) </i> (d) </h3>
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>

Answer key

  1. hosts websites online
  2. </i>
  3. An old fort
  4. in the same tab
  5. <hr>
  6. No
  7. I love mangoes.
  8. a code editor
  9. 1
  10. 150
  11. </h1>
  12. <h1>
  13. a web server
  14. <h1>
  15. <!--
  16. 6
  17. <ul>
  18. is where we type code
  19. line 3
  20. False
  21. Match report
  22. in the body
  23. opens it in a new tab
  24. 5
  25. Yes
  26. 1
  27. </html>
  28. Fun facts
  29. 2
  30. 3
  31. </em>
  32. shows pages from the web
  33. numbers
  34. False
  35. saves our .html files
  36. numbers
  37. Yes
  38. <li>
  39. </h3>
  40. <h1>

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