← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 129 · 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 list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing<br>Rivers flow</p>
  4. 4.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="350">
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <h3>My best friend</h3>
    line 3: <i>Fun facts</i>
    (a) line 1 (b) line 2 (c) line 3
  9. 9.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  10. 10.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  11. 11.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h2>? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  14. 14.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  15. 15.Which of these goes in the head? (a) <table> (b) <p> (c) <style> (d) <ul>
  16. 16.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue</p>
  18. 18.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  19. 19.Which of these is an empty tag? (a) <li> (b) <br> (c) <h1> (d) <b>
  20. 20.🔍 One closing tag is missing. Which one?
    <u>My best friend</u>
    <em>My pets
    <i>Our school trip</i>
    (a) </p> (b) </em> (c) </u> (d) </i>
  21. 21.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  22. 22.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  23. 23.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
  24. 24.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <a> (c) <style> (d) <meta charset="utf-8">
  25. 25.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
  26. 26.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  27. 27.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </body>
  28. 28.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  29. 29.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  31. 31.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) maths.html (b) art.html (c) news.html (d) About us
  32. 32.Which of these is an opening tag? (a) <body> (b) </h1> (c) </li> (d) </title>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Easy snacks (c) index.html (d) Space Facts
  34. 34.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) href (c) Maths fun (d) Visit the site
  35. 35.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) My pets (c) Rain today
  36. 36.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) turns HTML into a page (d) stores a website’s files
  37. 37.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
  38. 38.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.</u>
    <strong>My best friend
    <small>Fun facts</small>
    (a) </strong> (b) </u> (c) </small> (d) </h1>
  39. 39.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
  40. 40.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>I love mangoes.</h4>
    <p>Our school trip</p>
    <p>Our school trip</p>

Answer key

  1. <ol>
  2. A tiger asleep
  3. 4
  4. <a href="about.html">
  5. 350
  6. 6
  7. 2
  8. line 1
  9. -->
  10. a web server
  11. an opening tag
  12. <h1>
  13. Yes
  14. 1
  15. <style>
  16. <!DOCTYPE html>
  17. 2
  18. <ul>
  19. <br>
  20. </em>
  21. <li>
  22. opens it in a new tab
  23. True
  24. <a>
  25. 2
  26. <a>
  27. <li>
  28. a web browser
  29. in a new tab
  30. 5
  31. maths.html
  32. <body>
  33. Space Facts
  34. Visit the site
  35. Rain today
  36. saves our .html files
  37. <
  38. </strong>
  39. </h1>
  40. 2

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