← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 117 · 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 tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  2. 2.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  3. 3.🔍 One closing tag is missing. Which one?
    <p>I love mangoes.</p>
    <small>My best friend
    <b>Good morning!</b>
    (a) </p> (b) </u> (c) </b> (d) </small>
  4. 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) I like to read. (c) Easy snacks (d) index.html
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
  7. 7.🔍 One closing tag is missing. Which one?
    <h2>Our school trip</h2>
    <h3>Fun facts
    <h1>Rain today</h1>
    (a) </h1> (b) </p> (c) </h3> (d) </h2>
  8. 8.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) art.html
  10. 10.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) games.html (b) Art corner (c) quiz.html (d) news.html
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!</h1>
    line 2: <em>My best friend
    line 3: <strong>I love mangoes.</strong>
    (a) line 3 (b) line 2 (c) line 1
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  13. 13.True or false: a web server shows line numbers. (a) True (b) False
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today</h1>
    line 2: <u>Cricket is fun.
    line 3: <p>Good morning!</p>
    (a) line 1 (b) line 2 (c) line 3
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <p>The red kite</p>
    line 2: <small>My pets
    line 3: <i>Rain today</i>
    (a) line 1 (b) line 2 (c) line 3
  16. 16.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  17. 17.True or false: <title> is an empty tag. (a) True (b) False
  18. 18.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  19. 19.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  20. 20.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today</strong>
    line 2: <em>My pets</em>
    line 3: <h3>Good morning!
    (a) line 2 (b) line 3 (c) line 1
  22. 22.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  23. 23.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  24. 24.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Rain today</h2>
    <p>Cricket is fun.</p>
    <h3>Our school trip</h3>
    <h3>Good morning!</h3>
  25. 25.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
  26. 26.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
  27. 27.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) Class 7 Blog (c) I like to read. (d) body
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Birds sing<br>Rivers flow<br>Roses are red</p>
  31. 31.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Fun facts</p>
    <h4>My best friend</h4>
    <h4>My best friend</h4>
  32. 32.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
  34. 34.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) I love mangoes. (c) Good morning! (d) The red kite
  35. 35.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) Good morning!
  37. 37.Which of these is true of a code editor? (a) has an address bar (b) shows line numbers (c) answers page requests (d) opens web pages for us
  38. 38.🔗 Where does this link open?
    <a href="news.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  39. 39.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>My pets</p>
  40. 40.True or false: in <img>, height is read by screen readers. (a) True (b) False

Answer key

  1. <ul>
  2. Language
  3. </small>
  4. as one space
  5. My Hobbies
  6. <h6>
  7. </h3>
  8. a closing tag
  9. Contact us
  10. news.html
  11. line 2
  12. <h1>
  13. False
  14. line 2
  15. line 2
  16. <a href="about.html">
  17. False
  18. a web browser
  19. a code editor
  20. to describe the image
  21. line 3
  22. 3
  23. <ol>
  24. 4
  25. 2
  26. src
  27. a closing tag
  28. starts a new line
  29. My drawings
  30. 5
  31. 3
  32. an opening tag
  33. <h1>
  34. My best friend
  35. 2
  36. Rain today
  37. shows line numbers
  38. in a new tab
  39. 5
  40. False

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