← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 65 · 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.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  2. 2.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
  3. 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today</u>
    line 2: <h2>I love mangoes.
    line 3: <strong>Hello, world!</strong>
    (a) line 2 (b) line 1 (c) line 3
  5. 5.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  6. 6.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) My pets (c) My best friend (d) I love mangoes.
  7. 7.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  8. 8.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.Which of these is true of a code editor? (a) hosts websites online (b) shows line numbers (c) shows pages from the web (d) sends pages over the net
  10. 10.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <small>Cricket is fun.
    <em>I love mangoes.</em>
    (a) </h2> (b) </h1> (c) </em> (d) </small>
  11. 11.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
  12. 12.Which of these goes in the head? (a) <a> (b) <img> (c) <ul> (d) <title>
  13. 13.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
  14. 14.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h4>The red kite</h4>
    <p>Good morning!</p>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Stars shine</p>
  16. 16.Which of these is an opening tag? (a) </h1> (b) <b> (c) </body> (d) </b>
  17. 17.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  18. 18.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  19. 19.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  20. 20.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  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>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) I like to read. (c) Match report (d) body
  22. 22.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  23. 23.Which of these is an empty tag? (a) <li> (b) <h1> (c) <ul> (d) <img>
  24. 24.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  25. 25.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.📄 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) Space Facts (b) Easy snacks (c) Thanks for visiting. (d) index.html
  27. 27.True or false: in <img>, width describes the picture. (a) True (b) False
  28. 28.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
  29. 29.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Contact us (c) href (d) Visit the site
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow</p>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) width (b) Our school bus (c) The full moon (d) moon.png
  32. 32.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <h1>My best friend
    line 3: <em>Hello, world!</em>
    (a) line 1 (b) line 2 (c) line 3
  34. 34.True or false: in <img>, alt describes the picture. (a) True (b) False
  35. 35.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  36. 36.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  37. 37.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  38. 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  39. 39.True or false: <p> goes in the body. (a) True (b) False
  40. 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. Yes
  2. <li>
  3. width
  4. line 2
  5. <a href="about.html">
  6. I love mangoes.
  7. a web browser
  8. a closing tag
  9. shows line numbers
  10. </small>
  11. <h2>
  12. <title>
  13. </body>
  14. 2
  15. 3
  16. <b>
  17. <ol>
  18. bullets
  19. 1
  20. in the head
  21. Match report
  22. 4
  23. <img>
  24. False
  25. an empty tag
  26. Space Facts
  27. False
  28. a line across the page
  29. Contact us
  30. 3
  31. The full moon
  32. <ul>
  33. line 2
  34. True
  35. a web browser
  36. True
  37. a web server
  38. 6
  39. True
  40. has a closing tag

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