← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 958 · 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.🔍 One closing tag is missing. Which one?
    <small>My best friend</small>
    <u>Good morning!
    <h1>The red kite</h1>
    (a) </strong> (b) </u> (c) </h1> (d) </small>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) kite.png (b) Map of India (c) width (d) A red kite
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) width (b) An old fort (c) fort.jpg (d) A tiger asleep
  4. 4.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) </html> (b) <!DOCTYPE html>
  5. 5.Which of these is true of a code editor? (a) sends pages over the net (b) shows pages from the web (c) stores a website’s files (d) is where we type code
  6. 6.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Good morning!</h4>
    <p>Rain today</p>
    <h4>I love mangoes.</h4>
  7. 7.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <b>Our school trip
    <h1>My pets</h1>
    (a) </b> (b) </h1> (c) </h2> (d) </h3>
  8. 8.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
  9. 9.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) <i> (d) </i>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Roses are red</p>
  11. 11.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  13. 13.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) href (b) quiz.html (c) Contact us (d) Visit the site
  14. 14.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  16. 16.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
  17. 17.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  18. 18.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) Our school trip (c) Cricket is fun.
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) I love mangoes. (c) Our school trip
  20. 20.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Cricket is fun.</h2>
    <p>My best friend</p>
    <h3>Good morning!</h3>
  21. 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  22. 22.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Good morning!</h2>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
    <h2>Fun facts</h2>
  23. 23.🔍 Which is the odd one out? (a) sends pages over the net (b) turns HTML into a page (c) hosts websites online (d) stores a website’s files
  24. 24.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  25. 25.📋 What number does the browser show next to “Papaya”?
    <ol start="8">
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  27. 27.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  28. 28.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab
  29. 29.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <hr>
  30. 30.True or false: <ul> has a closing tag. (a) True (b) False
  31. 31.True or false: in <img>, height shows if the image fails. (a) True (b) False
  32. 32.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="350">
    (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg
  33. 33.True or false: a web browser shows line numbers. (a) False (b) True
  34. 34.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
  35. 35.🔍 One closing tag is missing. Which one?
    <b>Our school trip</b>
    <h3>Cricket is fun.</h3>
    <h2>My pets
    (a) </i> (b) </h2> (c) </b> (d) </h3>
  36. 36.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today</h2>
    line 2: <small>Cricket is fun.</small>
    line 3: <strong>The red kite
    (a) line 3 (b) line 2 (c) line 1
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  39. 39.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  40. 40.Which of these is an opening tag? (a) <h1> (b) </body> (c) </title> (d) </p>

Answer key

  1. </u>
  2. A red kite
  3. An old fort
  4. <!DOCTYPE html>
  5. is where we type code
  6. 3
  7. </b>
  8. structure
  9. </i>
  10. 5
  11. a paragraph
  12. 4
  13. Contact us
  14. <ul>
  15. 2
  16. 1
  17. 3
  18. Good morning!
  19. Hello, world!
  20. 3
  21. <a href="about.html">
  22. 3
  23. turns HTML into a page
  24. 2
  25. 10
  26. <h2>
  27. <!DOCTYPE html>
  28. in the same tab
  29. <hr>
  30. True
  31. False
  32. moon.png
  33. False
  34. <
  35. </h2>
  36. 4
  37. line 3
  38. 250
  39. 2
  40. <h1>

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