← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 585 · 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.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  2. 2.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  4. 4.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  6. 6.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <p>My pets
    <b>Good morning!</b>
    (a) </h2> (b) </b> (c) </h1> (d) </p>
  7. 7.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong/> (c) <\strong> (d) <strong>
  8. 8.Which of these goes in the head? (a) <a> (b) <img> (c) <ul> (d) <title>
  9. 9.True or false: <ul> goes inside ul or ol. (a) False (b) True
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets</strong>
    line 2: <em>Hello, world!</em>
    line 3: <h3>Cricket is fun.
    (a) line 1 (b) line 2 (c) line 3
  11. 11.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  12. 12.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <a>
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  14. 14.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  15. 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  17. 17.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  18. 18.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) The full moon (c) moon.png (d) fort.jpg
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) Maths fun (b) href (c) news.html (d) Visit the site
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  23. 23.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) height (d) width
  24. 24.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  26. 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
  27. 27.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
  28. 28.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  29. 29.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  30. 30.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) quiz.html (b) news.html (c) games.html (d) About us
  31. 31.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  32. 32.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  33. 33.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <p>My pets</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  34. 34.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.True or false: <li> is one item of a list. (a) True (b) False
  36. 36.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
    <p>Our school trip</p>
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
  38. 38.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    (a) Our school trip (b) My pets (c) My best friend (d) Hello, world!
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>

Answer key

  1. width
  2. an opening tag
  3. <h1>
  4. src
  5. <h1>
  6. </p>
  7. </strong>
  8. <title>
  9. False
  10. line 3
  11. <h6>
  12. <a>
  13. 1
  14. an opening tag
  15. in the head
  16. <h6>
  17. numbers
  18. a closing tag
  19. an opening tag
  20. moon.png
  21. Visit the site
  22. 300
  23. alt
  24. <ul>
  25. Yes
  26. Yes
  27. <h1>
  28. a code editor
  29. <!DOCTYPE html>
  30. news.html
  31. <ol>
  32. <a>
  33. 4
  34. in the body
  35. True
  36. 4
  37. <h1>
  38. Hello, world!
  39. 1
  40. <h3>

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