← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 329 · 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 heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  2. 2.🔍 One closing tag is missing. Which one?
    <p>My pets
    <u>My best friend</u>
    <h3>Cricket is fun.</h3>
    (a) </p> (b) </h3> (c) </u> (d) </strong>
  3. 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today</h2>
    line 2: <i>Good morning!
    line 3: <h3>Fun facts</h3>
    (a) line 1 (b) line 2 (c) line 3
  6. 6.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  9. 9.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
  10. 10.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  11. 11.🔠 Are headings shown in bold by default? (a) No (b) Yes
  12. 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  14. 14.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  15. 15.True or false: <li> is one item of a list. (a) False (b) True
  16. 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  17. 17.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) My best friend (b) Hello, world! (c) Cricket is fun. (d) The red kite
  19. 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  20. 20.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
  21. 21.True or false: <input> is an empty tag. (a) True (b) False
  22. 22.True or false: a web server answers page requests. (a) True (b) False
  23. 23.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  25. 25.Which of these has a closing tag? (a) <img> (b) <meta> (c) <hr> (d) <p>
  26. 26.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
  27. 27.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  28. 28.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  29. 29.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) href (d) Maths fun
  30. 30.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  31. 31.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  32. 32.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) art.html (b) news.html (c) maths.html (d) Take the quiz
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  34. 34.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) The red kite (c) Cricket is fun.
  35. 35.🔍 One closing tag is missing. Which one?
    <h1>Rain today
    <strong>Cricket is fun.</strong>
    <em>Fun facts</em>
    (a) </p> (b) </strong> (c) </em> (d) </h1>
  36. 36.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) answers page requests (d) saves our .html files
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Thanks for visiting. (d) Class 7 Blog
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
  39. 39.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  40. 40.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>

Answer key

  1. <h1>
  2. </p>
  3. has a closing tag
  4. has a closing tag
  5. line 2
  6. an opening tag
  7. <!--
  8. bullets
  9. -->
  10. <ol>
  11. Yes
  12. has a closing tag
  13. <a href="about.html">
  14. <img>
  15. True
  16. <h1>
  17. 2
  18. Hello, world!
  19. <ul>
  20. <head>
  21. True
  22. True
  23. a code editor
  24. <h5>
  25. <p>
  26. width
  27. the body
  28. <!DOCTYPE html>
  29. Visit the site
  30. to leave notes
  31. <li>
  32. maths.html
  33. Yes
  34. Cricket is fun.
  35. </h1>
  36. answers page requests
  37. Class 7 Blog
  38. 1
  39. True
  40. </p>

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