← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 652 · 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.True or false: a web browser shows line numbers. (a) False (b) True
  2. 2.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  3. 3.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  4. 4.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
  5. 5.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Rivers flow</p>
  7. 7.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Cricket is fun. (c) Hello, world! (d) Our school trip
  8. 8.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) Play games (b) https://example.com (c) maths.html (d) contact.html
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) moon.png (b) bus.jpg (c) fort.jpg (d) The full moon
  10. 10.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
  11. 11.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  12. 12.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <p>The red kite</p>
    <p>My pets</p>
  13. 13.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
  15. 15.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  16. 16.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.🔍 One closing tag is missing. Which one?
    <h1>The red kite
    <h3>Rain today</h3>
    <b>Cricket is fun.</b>
    (a) </h3> (b) </h1> (c) </b> (d) </strong>
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  19. 19.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Cricket is fun.</h4>
    <p>The red kite</p>
    <h2>Good morning!</h2>
    <p>Rain today</p>
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  22. 22.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) About us (b) Play games (c) games.html (d) href
  23. 23.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  24. 24.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  25. 25.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Kites fly high</p>
  27. 27.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) contact.html (c) About us (d) Contact us
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
  30. 30.🔍 One closing tag is missing. Which one?
    <h2>Good morning!</h2>
    <p>My pets
    <h1>My best friend</h1>
    (a) </p> (b) </h1> (c) </h2> (d) </small>
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) contact.html (c) href (d) Visit the site
  32. 32.Which of these goes in the head? (a) <a> (b) <ul> (c) <h1> (d) <style>
  33. 33.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  34. 34.True or false: a web browser hosts websites online. (a) False (b) True
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) A red kite (b) width (c) kite.png (d) Map of India
  36. 36.Which of these is an opening tag? (a) </body> (b) </li> (c) <h1> (d) </b>
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h6>
  39. 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  40. 40.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
    <p>Rain today</p>

Answer key

  1. False
  2. Yes
  3. <
  4. the body
  5. <ol>
  6. 3
  7. Hello, world!
  8. contact.html
  9. moon.png
  10. 3
  11. <!--
  12. 4
  13. a closing tag
  14. alt
  15. False
  16. a closing tag
  17. </h1>
  18. A happy dog
  19. 3
  20. Yes
  21. 100
  22. Play games
  23. <a href="about.html">
  24. a code editor
  25. <h6>
  26. 3
  27. About us
  28. Yes
  29. 2
  30. </p>
  31. Contact us
  32. <style>
  33. <a>
  34. False
  35. A red kite
  36. <h1>
  37. 150
  38. <h6>
  39. opens it in a new tab
  40. 3

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