← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 757 · 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.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  2. 2.🔍 One closing tag is missing. Which one?
    <i>Rain today</i>
    <strong>Fun facts</strong>
    <h1>My pets
    (a) </strong> (b) </i> (c) </h1> (d) </p>
  3. 3.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3> (d) <h3/>
  4. 4.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>The red kite</h2>
    <p>The red kite</p>
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  6. 6.Which of these is an opening tag? (a) <p> (b) </title> (c) </li> (d) </h1>
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
    (a) My pets (b) Good morning! (c) Fun facts
  8. 8.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) <html>
  9. 9.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  10. 10.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  11. 11.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  12. 12.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  13. 13.Which of these goes in the head? (a) <img> (b) <table> (c) <link rel="stylesheet"> (d) <h1>
  14. 14.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
  16. 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  17. 17.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) Home Text (d) HyperText
  18. 18.🔗 Where does this link open?
    <a href="contact.html">Play games</a>
    (a) in the same tab (b) in a new tab
  19. 19.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  20. 20.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  21. 21.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  22. 22.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b/> (c) </b> (d) <b>
  23. 23.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  24. 24.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My pets</p>
    <p>Good morning!</p>
    <h3>My best friend</h3>
    <p>My pets</p>
  25. 25.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) height (d) src
  26. 26.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  27. 27.Which of these is a closing tag? (a) <body> (b) </h1> (c) <p> (d) <h1>
  28. 28.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  29. 29.True or false: <ol> is an unordered list. (a) True (b) False
  30. 30.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <b>Our school trip</b>
    line 2: <h1>My best friend</h1>
    line 3: <p>Good morning!
    (a) line 3 (b) line 1 (c) line 2
  32. 32.🔍 One closing tag is missing. Which one?
    <h3>The red kite
    <p>My pets</p>
    <u>Our school trip</u>
    (a) </b> (b) </p> (c) </h3> (d) </u>
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  34. 34.True or false: <a> goes in the body. (a) True (b) False
  35. 35.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) Play games (d) games.html
  36. 36.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) School news (c) href (d) Art corner
  38. 38.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Welcome! (c) Riya’s Recipes (d) Here is my best one.
  40. 40.Which of these is an empty tag? (a) <title> (b) <input> (c) <b> (d) <li>

Answer key

  1. in a new tab
  2. </h1>
  3. </h3>
  4. 2
  5. <h1>
  6. <p>
  7. Fun facts
  8. <!DOCTYPE html>
  9. <ul>
  10. False
  11. <h1>
  12. Yes
  13. <link rel="stylesheet">
  14. in the body
  15. Yes
  16. opens it in a new tab
  17. HyperText
  18. in the same tab
  19. a code editor
  20. True
  21. an attribute
  22. </b>
  23. <ul>
  24. 2
  25. alt
  26. <li>
  27. </h1>
  28. <!--
  29. False
  30. a closing tag
  31. line 3
  32. </h3>
  33. 350
  34. True
  35. Take the quiz
  36. an opening tag
  37. Art corner
  38. </h2>
  39. Riya’s Recipes
  40. <input>

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