← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 944 · 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="art.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  2. 2.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  4. 4.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h3>
  8. 8.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Cricket is fun.</p>
    <h2>Our school trip</h2>
    <p>Hello, world!</p>
    <p>Rain today</p>
  9. 9.True or false: in <img>, src tells which image to load. (a) True (b) False
  10. 10.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
  11. 11.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  12. 12.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Rain today</p>
  13. 13.🔍 One closing tag is missing. Which one?
    <u>The red kite</u>
    <small>Cricket is fun.
    <em>My pets</em>
    (a) </h2> (b) </em> (c) </small> (d) </u>
  14. 14.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in a new tab (b) in the same tab
  15. 15.Which of these is true of a code editor? (a) hosts websites online (b) saves our .html files (c) has an address bar (d) shows pages from the web
  16. 16.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <html> (b) <head>
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  21. 21.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
  22. 22.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  23. 23.Which of these is a closing tag? (a) </b> (b) <h1> (c) <body> (d) <b>
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) I like to read. (c) All about me (d) body
  25. 25.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  26. 26.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) https://example.com (b) contact.html (c) maths.html (d) Maths fun
  27. 27.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  28. 28.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
  29. 29.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  30. 30.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.True or false: a web server has an address bar. (a) False (b) True
  32. 32.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  33. 33.🔍 One closing tag is missing. Which one?
    <h3>Good morning!</h3>
    <b>Rain today
    <h2>My best friend</h2>
    (a) </b> (b) </h2> (c) </h3> (d) </em>
  34. 34.Which of these is an opening tag? (a) <h1> (b) </title> (c) </b> (d) </h1>
  35. 35.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  36. 36.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
  37. 37.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) Our school trip (c) My pets
  38. 38.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) about.html (b) href (c) Visit the site (d) Contact us
  39. 39.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <small>The red kite
    <h3>I love mangoes.</h3>
    (a) </h1> (b) </small> (c) </h3> (d) </i>
  40. 40.True or false: <meta> has a closing tag. (a) True (b) False

Answer key

  1. in the same tab
  2. a closing tag
  3. 100
  4. a closing tag
  5. <a href="about.html">
  6. 4
  7. <h1>
  8. 2
  9. True
  10. a paragraph
  11. <!--
  12. 4
  13. </small>
  14. in the same tab
  15. saves our .html files
  16. has a closing tag
  17. <html>
  18. <ol>
  19. numbers
  20. numbers
  21. 1
  22. <ul>
  23. </b>
  24. All about me
  25. a web browser
  26. contact.html
  27. <h2>
  28. alt
  29. width
  30. in the body
  31. False
  32. True
  33. </b>
  34. <h1>
  35. a web server
  36. Markup
  37. Good morning!
  38. Contact us
  39. </small>
  40. False

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