← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 378 · 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.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🔠 Are headings shown in bold by default? (a) Yes (b) No
  3. 3.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  4. 4.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
  5. 5.True or false: in <img>, src is read by screen readers. (a) False (b) True
  6. 6.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  7. 7.Which of these is true of a code editor? (a) sends pages over the net (b) shows line numbers (c) opens web pages for us (d) has an address bar
  8. 8.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h3>The red kite</h3>
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  10. 10.True or false: HTML on its own can add up two numbers. (a) False (b) True
  11. 11.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  12. 12.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.True or false: <h1> has a closing tag. (a) True (b) False
  14. 14.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  15. 15.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) Contact us (c) https://example.com (d) maths.html
  16. 16.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in a new tab (b) in the same tab
  17. 17.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) Mars is red. (c) body (d) Space Facts
  19. 19.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  20. 20.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.
    line 2: <h2>The red kite</h2>
    line 3: <h3>My best friend</h3>
    (a) line 2 (b) line 1 (c) line 3
  22. 22.True or false: in <img>, src names the picture file. (a) True (b) False
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
  24. 24.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  26. 26.Which of these is an opening tag? (a) </h1> (b) </p> (c) </li> (d) <li>
  27. 27.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  29. 29.True or false: <ul> shows bullet points. (a) False (b) True
  30. 30.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
  31. 31.True or false: <ol> goes inside ul or ol. (a) False (b) True
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Class 7 Blog (c) body (d) Welcome!
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  34. 34.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Good morning!</p>
    <h2>My pets</h2>
    <p>Fun facts</p>
    <h2>The red kite</h2>
    <p>Cricket is fun.</p>
  35. 35.True or false: a code editor saves our .html files. (a) False (b) True
  36. 36.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  37. 37.Which of these is true of a web browser? (a) answers page requests (b) is where we type code (c) shows pages from the web (d) stores a website’s files
  38. 38.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  39. 39.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  40. 40.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>

Answer key

  1. in the head
  2. Yes
  3. No
  4. </i>
  5. False
  6. <img>
  7. shows line numbers
  8. 3
  9. <h4>
  10. False
  11. <li>
  12. in the body
  13. True
  14. a web server
  15. contact.html
  16. in the same tab
  17. <ul>
  18. Match report
  19. a web browser
  20. the body
  21. line 1
  22. True
  23. 2
  24. 4
  25. <h4>
  26. <li>
  27. HyperText
  28. 3
  29. True
  30. <h6>
  31. False
  32. Welcome!
  33. 400
  34. 4
  35. True
  36. <li>
  37. shows pages from the web
  38. <h2>
  39. <h1>
  40. <h4>

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