← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 176 · 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 <p> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
  3. 3.Which of these is a closing tag? (a) </b> (b) <body> (c) <p> (d) <title>
  4. 4.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  6. 6.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <h1>
  7. 7.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <h2>My pets</h2>
    <h2>My best friend</h2>
    <p>Fun facts</p>
    <p>Fun facts</p>
  9. 9.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  10. 10.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <input>
  11. 11.True or false: <ul> is an empty tag. (a) True (b) False
  12. 12.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  13. 13.True or false: <hr> is an empty tag. (a) False (b) True
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Match report (c) Try this poha. (d) Riya’s Recipes
  15. 15.True or false: in <img>, alt describes the picture. (a) True (b) False
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Kites fly high<br>Stars shine<br>Rivers flow</p>
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine</p>
  18. 18.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  19. 19.Which of these has a closing tag? (a) <meta> (b) <img> (c) <li> (d) <input>
  20. 20.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
  21. 21.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  23. 23.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) My pets
  24. 24.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  25. 25.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  26. 26.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>My best friend</p>
  27. 27.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Birds sing</p>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) dog.jpg (b) moon.png (c) Birthday cake (d) cake.jpg
  30. 30.📄 Can HTML on its own make a form? (a) Yes (b) No
  31. 31.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  32. 32.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.
    line 2: <h1>Rain today</h1>
    line 3: <em>Fun facts</em>
    (a) line 1 (b) line 3 (c) line 2
  36. 36.🔗 What does HyperText mean? (a) secret text (b) text with links (c) text in colour (d) very big text
  37. 37.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Rivers flow<br>Sky is blue</p>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!</h1>
    line 2: <h2>Fun facts
    line 3: <u>Our school trip</u>
    (a) line 3 (b) line 2 (c) line 1
  40. 40.Which of these is an opening tag? (a) </p> (b) </body> (c) <p> (d) </title>

Answer key

  1. in the body
  2. 3
  3. </b>
  4. a closing tag
  5. opens it in a new tab
  6. <h1>
  7. in the head
  8. 3
  9. -->
  10. <title>
  11. False
  12. <a>
  13. True
  14. Match report
  15. True
  16. 5
  17. 2
  18. <h6>
  19. <li>
  20. 1
  21. an attribute
  22. 150
  23. My best friend
  24. <!--
  25. <img>
  26. 2
  27. <ol>
  28. 3
  29. cake.jpg
  30. Yes
  31. 6
  32. <a href="about.html">
  33. 4
  34. Yes
  35. line 1
  36. text with links
  37. <ul>
  38. 4
  39. line 2
  40. <p>

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