← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 223 · 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.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  2. 2.Which of these is a closing tag? (a) <title> (b) <li> (c) <h1> (d) </b>
  3. 3.Which of these is true of a web browser? (a) turns HTML into a page (b) saves our .html files (c) shows line numbers (d) colours code to help us
  4. 4.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>My pets</p>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip
    line 2: <i>My best friend</i>
    line 3: <small>Hello, world!</small>
    (a) line 3 (b) line 1 (c) line 2
  6. 6.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <h3>My best friend</h3>
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  8. 8.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
  9. 9.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  11. 11.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Rain today (b) The red kite (c) Cricket is fun. (d) Good morning!
  12. 12.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <h2>The red kite</h2>
  13. 13.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    (a) Fun facts (b) My best friend (c) The red kite (d) Our school trip
  15. 15.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <h3/> (c) <\h3> (d) </h3>
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h4>
  17. 17.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) maths.html (c) href (d) About us
  18. 18.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
  22. 22.Which of these is true of a web server? (a) hosts websites online (b) shows pages from the web (c) colours code to help us (d) is where we type code
  23. 23.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  24. 24.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
  25. 25.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) saves our .html files
  26. 26.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
  27. 27.True or false: <ul> lists things in any order. (a) True (b) False
  28. 28.True or false: a web browser turns HTML into a page. (a) True (b) False
  29. 29.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
  30. 30.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  31. 31.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) saves our .html files (d) turns HTML into a page
  32. 32.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  33. 33.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  35. 35.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <hr> (d) <title>
  36. 36.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  37. 37.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <b>Rain today</b>
    line 2: <h3>My best friend
    line 3: <small>Good morning!</small>
    (a) line 1 (b) line 3 (c) line 2
  39. 39.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  40. 40.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>

Answer key

  1. <!--
  2. </b>
  3. turns HTML into a page
  4. 4
  5. line 1
  6. 2
  7. <h5>
  8. on the browser tab
  9. an opening tag
  10. <h5>
  11. The red kite
  12. 2
  13. an empty tag
  14. The red kite
  15. </h3>
  16. <h3>
  17. Play games
  18. has a closing tag
  19. has a closing tag
  20. opens it in a new tab
  21. 2
  22. hosts websites online
  23. 1
  24. 2
  25. opens web pages for us
  26. <!DOCTYPE html>
  27. True
  28. True
  29. a code editor
  30. <h1>
  31. saves our .html files
  32. to describe the image
  33. in the head
  34. Yes
  35. <hr>
  36. 1
  37. <li>
  38. line 2
  39. Markup
  40. <h1>

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