← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 726 · 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="games.html">Play games</a>
    (a) in the same tab (b) in a new tab
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend
    line 2: <h1>Rain today</h1>
    line 3: <small>Good morning!</small>
    (a) line 2 (b) line 3 (c) line 1
  3. 3.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  4. 4.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  5. 5.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    (a) My pets (b) Fun facts (c) Hello, world!
  6. 6.Which of these is true of a web browser? (a) shows line numbers (b) sends pages over the net (c) saves our .html files (d) has an address bar
  7. 7.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  8. 8.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  11. 11.Which of these is true of a code editor? (a) saves our .html files (b) hosts websites online (c) opens web pages for us (d) turns HTML into a page
  12. 12.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
  13. 13.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
  14. 14.True or false: <title> goes in the head. (a) False (b) True
  15. 15.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  16. 16.📋 What number does the browser show next to “Mango”?
    <ol start="6">
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  17. 17.True or false: <style> goes in the body. (a) True (b) False
  18. 18.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) quiz.html (b) games.html (c) news.html (d) Visit the site
  19. 19.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
  20. 20.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  21. 21.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  22. 22.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Cricket is fun.</p>
    <h4>The red kite</h4>
    <h3>Our school trip</h3>
  24. 24.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
  25. 25.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.Which of these goes in the body? (a) <title> (b) <ul> (c) <link rel="stylesheet"> (d) <style>
  28. 28.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <p>
  29. 29.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  30. 30.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  32. 32.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  33. 33.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  35. 35.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a printer (d) a microphone
  36. 36.True or false: <hr> has a closing tag. (a) True (b) False
  37. 37.True or false: <img> is an empty tag. (a) True (b) False
  38. 38.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  40. 40.True or false: in <img>, width describes the picture. (a) True (b) False

Answer key

  1. in the same tab
  2. line 1
  3. <
  4. 4
  5. My pets
  6. has an address bar
  7. Markup
  8. False
  9. 2
  10. 1
  11. saves our .html files
  12. <h1>
  13. <li>
  14. True
  15. src
  16. 8
  17. False
  18. news.html
  19. width
  20. <h1>
  21. Yes
  22. 3
  23. 3
  24. <h1>
  25. has a closing tag
  26. a closing tag
  27. <ul>
  28. <p>
  29. starts a new line
  30. a closing tag
  31. in the same tab
  32. in the same tab
  33. an attribute
  34. Yes
  35. a plain text editor
  36. False
  37. True
  38. an empty tag
  39. 1
  40. False

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