← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 883 · 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 words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) Play games (c) About us (d) about.html
  2. 2.🔍 One closing tag is missing. Which one?
    <u>Hello, world!
    <b>The red kite</b>
    <em>My pets</em>
    (a) </u> (b) </em> (c) </i> (d) </b>
  3. 3.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) has an address bar (d) saves our .html files
  4. 4.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  5. 5.🔍 One closing tag is missing. Which one?
    <h3>Good morning!
    <h2>The red kite</h2>
    <strong>My best friend</strong>
    (a) </strong> (b) </em> (c) </h2> (d) </h3>
  6. 6.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  8. 8.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!
    line 2: <strong>My best friend</strong>
    line 3: <h2>Rain today</h2>
    (a) line 3 (b) line 1 (c) line 2
  10. 10.Which of these goes in the head? (a) <table> (b) <a> (c) <ul> (d) <title>
  11. 11.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  12. 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  13. 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  14. 14.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a music player (d) a web browser
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) bus.jpg (b) An old fort (c) Our school bus (d) width
  16. 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  17. 17.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) saves our .html files (d) turns HTML into a page
  18. 18.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) is where we type code (d) stores a website’s files
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  20. 20.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <p>My pets</p>
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My pets</p>
  23. 23.True or false: <b> is an empty tag. (a) False (b) True
  24. 24.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
  26. 26.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Cricket is fun.</p>
    <h3>Cricket is fun.</h3>
    <p>Good morning!</p>
  27. 27.Which of these goes in the head? (a) <h1> (b) <img> (c) <a> (d) <style>
  28. 28.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) href (b) Maths fun (c) art.html (d) Visit the site
  29. 29.True or false: a web server shows pages from the web. (a) False (b) True
  30. 30.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  31. 31.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
  32. 32.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </html> (b) </body>
  33. 33.Which of these goes in the head? (a) <table> (b) <ul> (c) <a> (d) <meta charset="utf-8">
  34. 34.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
  36. 36.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) quiz.html (b) Visit the site (c) href (d) Maths fun
  38. 38.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <strong>Cricket is fun.</strong>
    <h3>My pets
    (a) </h3> (b) </h2> (c) </h1> (d) </strong>
  39. 39.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Our school trip</p>
    <h3>Fun facts</h3>
  40. 40.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.</u>
    <b>I love mangoes.
    <small>Hello, world!</small>
    (a) </small> (b) </p> (c) </b> (d) </u>

Answer key

  1. Play games
  2. </u>
  3. has an address bar
  4. 6
  5. </h3>
  6. an opening tag
  7. src
  8. dog.jpg
  9. line 1
  10. <title>
  11. href
  12. <h6>
  13. Yes
  14. a web browser
  15. Our school bus
  16. a slash /
  17. saves our .html files
  18. is where we type code
  19. 3
  20. 2
  21. alt
  22. 3
  23. False
  24. a code editor
  25. 1
  26. 2
  27. <style>
  28. Visit the site
  29. False
  30. <!--
  31. the body
  32. </body>
  33. <meta charset="utf-8">
  34. a closing tag
  35. 4
  36. <li>
  37. Visit the site
  38. </h3>
  39. 2
  40. </b>

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