← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 859 · 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 part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  2. 2.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
  3. 3.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    (a) The red kite (b) My best friend (c) My pets
  4. 4.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
  7. 7.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <html>
  8. 8.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  10. 10.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Match report (c) index.html (d) Class 7 Blog
  12. 12.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Visit the site
  13. 13.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  15. 15.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h2>
  16. 16.True or false: <input> has a closing tag. (a) True (b) False
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  18. 18.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine<br>Sky is blue<br>Rivers flow</p>
  21. 21.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) quiz.html (b) Play games (c) news.html (d) art.html
  22. 22.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
  23. 23.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  24. 24.True or false: a web browser shows pages from the web. (a) False (b) True
  25. 25.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  26. 26.True or false: <li> lists steps in order. (a) True (b) False
  27. 27.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  28. 28.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in the same tab (b) in a new tab
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip
    line 2: <i>My pets</i>
    line 3: <h3>Good morning!</h3>
    (a) line 1 (b) line 3 (c) line 2
  30. 30.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  31. 31.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  32. 32.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    (a) Fun facts (b) My pets (c) My best friend
  33. 33.Which of these is true of a code editor? (a) opens web pages for us (b) hosts websites online (c) shows pages from the web (d) saves our .html files
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>Hello, world!</p>
    (a) Our school trip (b) Fun facts (c) Hello, world!
  35. 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  36. 36.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <br>
  37. 37.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Good morning!</h2>
    <h2>The red kite</h2>
  38. 38.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  39. 39.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Cricket is fun.</p>
    <h3>Hello, world!</h3>
  40. 40.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. the body
  2. <h6>
  3. My pets
  4. bus.jpg
  5. numbers
  6. 2
  7. </html>
  8. a closing tag
  9. <!DOCTYPE html>
  10. Yes
  11. Class 7 Blog
  12. about.html
  13. a line across the page
  14. 3
  15. <h6>
  16. False
  17. <h4>
  18. <a>
  19. 150
  20. 5
  21. art.html
  22. </strong>
  23. a web browser
  24. True
  25. numbers
  26. False
  27. 5
  28. in the same tab
  29. line 1
  30. <
  31. on the browser tab
  32. Fun facts
  33. saves our .html files
  34. Fun facts
  35. opens it in a new tab
  36. <p>
  37. 3
  38. <li>
  39. 2
  40. has a closing tag

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