← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 914 · 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 text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Rain today (c) My pets
  2. 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  3. 3.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  4. 4.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
  5. 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  6. 6.Which of these is an opening tag? (a) </p> (b) <title> (c) </li> (d) </b>
  7. 7.Which of these has a closing tag? (a) <hr> (b) <input> (c) <br> (d) <p>
  8. 8.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Kites fly high<br>Sky is blue<br>Birds sing</p>
  10. 10.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Good morning!</p>
    <h3>My best friend</h3>
    <h3>Rain today</h3>
    <p>The red kite</p>
  11. 11.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Laptop (d) Link
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  13. 13.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
  14. 14.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
  15. 15.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  16. 16.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) href (c) Play games (d) Take the quiz
  17. 17.True or false: <table> goes in the head. (a) False (b) True
  18. 18.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <h4>Fun facts</h4>
  19. 19.🔍 One closing tag is missing. Which one?
    <b>Hello, world!
    <h2>I love mangoes.</h2>
    <em>The red kite</em>
    (a) </em> (b) </p> (c) </b> (d) </h2>
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
  21. 21.🔍 One closing tag is missing. Which one?
    <p>Fun facts</p>
    <em>I love mangoes.</em>
    <h2>Rain today
    (a) </p> (b) </em> (c) </u> (d) </h2>
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h1>Our school trip</h1>
    line 2: <h2>Fun facts</h2>
    line 3: <h3>I love mangoes.
    (a) line 3 (b) line 2 (c) line 1
  23. 23.True or false: <ul> goes in the head. (a) True (b) False
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) dog.jpg (c) A happy dog (d) The full moon
  25. 25.True or false: a code editor has an address bar. (a) True (b) False
  26. 26.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  27. 27.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>I love mangoes.</h4>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  29. 29.🔠 Are headings shown in bold by default? (a) No (b) Yes
  30. 30.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.🔍 Which is the odd one out? (a) hosts websites online (b) has an address bar (c) answers page requests (d) stores a website’s files
  33. 33.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <h2>The red kite</h2>
    <p>My best friend</p>
  34. 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  35. 35.True or false: in <img>, src sets how wide it is. (a) True (b) False
  36. 36.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  40. 40.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>

Answer key

  1. My pets
  2. opens it in a new tab
  3. Yes
  4. starts a new line
  5. <a href="about.html">
  6. <title>
  7. <p>
  8. <ul>
  9. 5
  10. 3
  11. Language
  12. <h1>
  13. alt
  14. a web server
  15. True
  16. Take the quiz
  17. False
  18. 3
  19. </b>
  20. 6
  21. </h2>
  22. line 3
  23. False
  24. A happy dog
  25. False
  26. True
  27. 4
  28. Birthday cake
  29. Yes
  30. an opening tag
  31. has a closing tag
  32. has an address bar
  33. 4
  34. <ol>
  35. False
  36. -->
  37. 200
  38. Yes
  39. 2
  40. <h1>

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