← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 700 · 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 one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  2. 2.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) saves our .html files (d) shows pages from the web
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
  4. 4.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
  5. 5.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  6. 6.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
  7. 7.🔍 Which is the odd one out? (a) has an address bar (b) sends pages over the net (c) shows pages from the web (d) opens web pages for us
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
  9. 9.🔍 One closing tag is missing. Which one?
    <p>My pets</p>
    <b>Rain today</b>
    <h2>Fun facts
    (a) </b> (b) </p> (c) </h2> (d) </h1>
  10. 10.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
  11. 11.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
  12. 12.🖼️ 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
  13. 13.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Birds sing<br>Sky is blue</p>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <u>Fun facts</u>
    line 2: <p>My pets
    line 3: <small>I love mangoes.</small>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.True or false: <ol> is one item of a list. (a) False (b) True
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  18. 18.📄 Can HTML on its own make a form? (a) Yes (b) No
  19. 19.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  20. 20.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  21. 21.Which of these is true of a web server? (a) colours code to help us (b) stores a website’s files (c) has an address bar (d) opens web pages for us
  22. 22.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  23. 23.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  24. 24.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.</u>
    <p>Cricket is fun.</p>
    <h1>Our school trip
    (a) </h3> (b) </h1> (c) </p> (d) </u>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <em>I love mangoes.</em>
    line 3: <h1>Hello, world!
    (a) line 2 (b) line 1 (c) line 3
  26. 26.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <title>
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  28. 28.Which of these is a closing tag? (a) <h1> (b) <body> (c) </li> (d) <title>
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
  30. 30.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow</p>
  32. 32.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h3>
  33. 33.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  35. 35.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  37. 37.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .html (d) .mp3
  38. 38.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) href (b) about.html (c) Visit the site (d) Maths fun
  39. 39.True or false: <br> is an empty tag. (a) True (b) False
  40. 40.Which of these is an opening tag? (a) </b> (b) </h1> (c) <h1> (d) </title>

Answer key

  1. a code editor
  2. shows pages from the web
  3. 1
  4. a web browser
  5. alt
  6. as one space
  7. sends pages over the net
  8. 1
  9. </h2>
  10. an attribute
  11. <li>
  12. A happy dog
  13. <h6>
  14. 4
  15. line 2
  16. False
  17. <h2>
  18. Yes
  19. href
  20. the body
  21. stores a website’s files
  22. to leave notes
  23. opens it in a new tab
  24. </h1>
  25. line 3
  26. <hr>
  27. bullets
  28. </li>
  29. 2
  30. an empty tag
  31. 2
  32. <h1>
  33. in the same tab
  34. <h5>
  35. to describe the image
  36. <h1>
  37. .html
  38. Visit the site
  39. True
  40. <h1>

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