← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 43 · 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 heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h5>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
  2. 2.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  3. 3.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
  4. 4.Which of these is true of a code editor? (a) saves our .html files (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
  5. 5.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
  6. 6.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  7. 7.True or false: HTML on its own can make links to pages. (a) True (b) False
  8. 8.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  10. 10.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <html> (d) <body>
  11. 11.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Our school trip</h3>
    <h2>Fun facts</h2>
    <p>Cricket is fun.</p>
  12. 12.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) games.html
  13. 13.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
  14. 14.Which of these is a closing tag? (a) <li> (b) <title> (c) <h1> (d) </p>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <u>Hello, world!</u>
    line 2: <strong>Cricket is fun.
    line 3: <small>Our school trip</small>
    (a) line 2 (b) line 1 (c) line 3
  16. 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  17. 17.Which of these is an empty tag? (a) <p> (b) <h1> (c) <hr> (d) <title>
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) A red kite (b) kite.png (c) width (d) Map of India
  19. 19.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  20. 20.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  21. 21.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  22. 22.🔍 One closing tag is missing. Which one?
    <em>Hello, world!
    <small>I love mangoes.</small>
    <p>Our school trip</p>
    (a) </p> (b) </small> (c) </h1> (d) </em>
  23. 23.Which of these is true of a web browser? (a) shows pages from the web (b) shows line numbers (c) colours code to help us (d) sends pages over the net
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Roses are red<br>Stars shine<br>Birds sing</p>
  25. 25.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h2>The red kite</h2>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
  26. 26.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) My Hobbies (c) body (d) I like to read.
  28. 28.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>My best friend</h3>
    <h2>Hello, world!</h2>
  29. 29.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  30. 30.True or false: <table> goes in the body. (a) False (b) True
  31. 31.True or false: <title> is an empty tag. (a) True (b) False
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  33. 33.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) Play games (b) news.html (c) href (d) About us
  34. 34.🌍 Which program shows a web page to us? (a) a web browser (b) a paint program (c) a calculator (d) a music player
  35. 35.True or false: <hr> has a closing tag. (a) False (b) True
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My Hobbies (b) Try this poha. (c) index.html (d) All about me
  37. 37.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) Hello, world! (b) My pets (c) I love mangoes. (d) Rain today
  38. 38.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  39. 39.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>

Answer key

  1. <h1>
  2. <ul>
  3. <!DOCTYPE html>
  4. saves our .html files
  5. a plain text editor
  6. <ol>
  7. True
  8. an opening tag
  9. the body
  10. <!DOCTYPE html>
  11. 3
  12. Maths fun
  13. <h1>
  14. </p>
  15. line 2
  16. opens it in a new tab
  17. <hr>
  18. A red kite
  19. <
  20. href
  21. Yes
  22. </em>
  23. shows pages from the web
  24. 5
  25. 3
  26. <li>
  27. Easy snacks
  28. 3
  29. <a href="about.html">
  30. True
  31. False
  32. <h1>
  33. Play games
  34. a web browser
  35. False
  36. My Hobbies
  37. Hello, world!
  38. 4
  39. No
  40. <h2>

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