← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 615 · 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.💬 Does the browser show comments on the page? (a) Yes (b) No
  2. 2.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
  3. 3.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  5. 5.📝 What does <hr> draw? (a) a picture (b) a link (c) a table (d) a line across the page
  6. 6.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .mp3 (d) .html
  7. 7.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  8. 8.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  9. 9.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  10. 10.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    (a) My best friend (b) I love mangoes. (c) Rain today (d) My pets
  11. 11.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) </body>
  12. 12.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>Our school trip</p>
    <h2>Rain today</h2>
  13. 13.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  15. 15.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
  16. 16.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) contact.html (b) about.html (c) Maths fun (d) games.html
  17. 17.True or false: <li> goes inside ul or ol. (a) True (b) False
  18. 18.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) answers page requests (d) opens web pages for us
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!
    line 2: <em>I love mangoes.</em>
    line 3: <small>Our school trip</small>
    (a) line 2 (b) line 3 (c) line 1
  20. 20.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
  21. 21.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  23. 23.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  24. 24.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  25. 25.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Visit the site (b) maths.html (c) Contact us (d) href
  26. 26.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <u>I love mangoes.</u>
    line 2: <h2>Our school trip
    line 3: <b>Good morning!</b>
    (a) line 3 (b) line 2 (c) line 1
  28. 28.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  29. 29.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  30. 30.True or false: <title> goes in the head. (a) False (b) True
  31. 31.True or false: a code editor is where we type code. (a) False (b) True
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  33. 33.🔍 One closing tag is missing. Which one?
    <h3>The red kite</h3>
    <em>Good morning!</em>
    <b>Rain today
    (a) </em> (b) </h3> (c) </b> (d) </h2>
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <p>My best friend</p>
  35. 35.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
  36. 36.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  37. 37.Which of these is a closing tag? (a) </h1> (b) <p> (c) <title> (d) <li>
  38. 38.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <img> (c) <a> (d) <ul>
  39. 39.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    (a) Hello, world! (b) I love mangoes. (c) The red kite
  40. 40.📋 What number does the browser show next to “Orange”?
    <ol start="4">
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>

Answer key

  1. No
  2. src
  3. Yes
  4. 200
  5. a line across the page
  6. .html
  7. <!--
  8. <h6>
  9. <a href="about.html">
  10. My pets
  11. <!DOCTYPE html>
  12. 2
  13. <h6>
  14. <h1>
  15. <
  16. games.html
  17. True
  18. opens web pages for us
  19. line 1
  20. <a>
  21. 2
  22. 2
  23. <li>
  24. <li>
  25. Contact us
  26. Yes
  27. line 2
  28. True
  29. -->
  30. True
  31. True
  32. 5
  33. </b>
  34. 1
  35. <ul>
  36. in a new tab
  37. </h1>
  38. <link rel="stylesheet">
  39. I love mangoes.
  40. 5

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