← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 110 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  2. 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  3. 3.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  4. 4.True or false: HTML on its own can make headings. (a) True (b) False
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  6. 6.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  7. 7.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>The red kite</h4>
    <p>The red kite</p>
  8. 8.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) opens web pages for us (d) shows pages from the web
  9. 9.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
  10. 10.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  11. 11.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  12. 12.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>My pets</h2>
    <p>My best friend</p>
  13. 13.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  14. 14.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    (a) Rain today (b) My best friend (c) Fun facts
  15. 15.📋 What number does the browser show next to “Jamun”?
    <ol start="5">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  16. 16.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
  17. 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
  18. 18.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) My pets (c) My best friend
  20. 20.True or false: <input> is an empty tag. (a) True (b) False
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Kites fly high<br>Birds sing</p>
  22. 22.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <h3>My best friend</h3>
  24. 24.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) maths.html (c) news.html (d) art.html
  26. 26.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  27. 27.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
  28. 28.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <h4>Rain today</h4>
    <h2>Our school trip</h2>
    <p>Fun facts</p>
  29. 29.True or false: in <img>, src names the picture file. (a) True (b) False
  30. 30.True or false: a code editor has an address bar. (a) True (b) False
  31. 31.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  32. 32.True or false: in <img>, src tells which image to load. (a) False (b) True
  33. 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
  35. 35.True or false: in <img>, alt tells which image to load. (a) True (b) False
  36. 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  39. 39.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) https://example.com
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Fun facts (b) My pets (c) My best friend

Answer key

  1. 2
  2. opens it in a new tab
  3. alt
  4. True
  5. numbers
  6. a web browser
  7. 2
  8. is where we type code
  9. 3
  10. a web server
  11. <h6>
  12. 2
  13. <a>
  14. Fun facts
  15. 6
  16. </p>
  17. as one space
  18. Yes
  19. My best friend
  20. True
  21. 4
  22. an opening tag
  23. 4
  24. a closing tag
  25. maths.html
  26. <a href="about.html">
  27. <h5>
  28. 3
  29. True
  30. False
  31. 1
  32. True
  33. has a closing tag
  34. 2
  35. False
  36. has a closing tag
  37. src
  38. bullets
  39. Take the quiz
  40. My best friend

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