← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 375 · 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.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
  2. 2.🔍 One closing tag is missing. Which one?
    <h2>My best friend</h2>
    <small>Hello, world!
    <p>The red kite</p>
    (a) </h3> (b) </small> (c) </p> (d) </h2>
  3. 3.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) Our school trip (c) My best friend
  4. 4.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  5. 5.📋 What number does the browser show next to “Banana”?
    <ol start="7">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  6. 6.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
  7. 7.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) Art corner (c) School news (d) href
  8. 8.True or false: <style> goes in the head. (a) False (b) True
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
  10. 10.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend
    line 2: <h2>Cricket is fun.</h2>
    line 3: <u>I love mangoes.</u>
    (a) line 1 (b) line 3 (c) line 2
  14. 14.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
  15. 15.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  16. 16.Which of these is true of a web browser? (a) colours code to help us (b) has an address bar (c) saves our .html files (d) stores a website’s files
  17. 17.True or false: <ol> is an unordered list. (a) True (b) False
  18. 18.True or false: <br> is an empty tag. (a) False (b) True
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!
    line 2: <h3>My pets</h3>
    line 3: <p>I love mangoes.</p>
    (a) line 3 (b) line 2 (c) line 1
  20. 20.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  22. 22.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Cricket is fun.</h4>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <h3>The red kite</h3>
  23. 23.True or false: HTML on its own can show paragraphs. (a) False (b) True
  24. 24.🔍 One closing tag is missing. Which one?
    <u>Our school trip</u>
    <h3>Hello, world!</h3>
    <b>Cricket is fun.
    (a) </u> (b) </b> (c) </h3> (d) </h2>
  25. 25.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  26. 26.True or false: in <img>, height sets how tall it is. (a) False (b) True
  27. 27.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  28. 28.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <h1>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  30. 30.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) My best friend (b) Hello, world! (c) Good morning! (d) Our school trip
  32. 32.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  33. 33.💬 How does an HTML comment end? (a) */ (b) --> (c) >> (d) //
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Grapes</li>
    </ul>
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  36. 36.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  37. 37.Which of these has a closing tag? (a) <br> (b) <hr> (c) <p> (d) <img>
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  39. 39.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">

Answer key

  1. .html
  2. </small>
  3. My best friend
  4. <ol>
  5. 8
  6. 3
  7. Art corner
  8. True
  9. 2
  10. an opening tag
  11. height
  12. <h1>
  13. line 1
  14. </html>
  15. 5
  16. has an address bar
  17. False
  18. True
  19. line 1
  20. an empty tag
  21. 1
  22. 3
  23. True
  24. </b>
  25. <a href="about.html">
  26. True
  27. in the same tab
  28. <h1>
  29. A happy dog
  30. a closing tag
  31. Hello, world!
  32. a web browser
  33. -->
  34. 2
  35. <h1>
  36. <ul>
  37. <p>
  38. <h2>
  39. starts a new line
  40. 200

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