← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 429 · 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 code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h1>My best friend</h1>
    line 2: <small>Good morning!
    line 3: <p>Fun facts</p>
    (a) line 2 (b) line 3 (c) line 1
  3. 3.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  4. 4.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  5. 5.True or false: in <img>, width sets how tall it is. (a) True (b) False
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Hello, world! (c) Rain today (d) My best friend
  7. 7.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) contact.html (c) Maths fun (d) about.html
  8. 8.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Laptop (d) Language
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine</p>
  10. 10.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  11. 11.True or false: a web browser opens web pages for us. (a) True (b) False
  12. 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
  14. 14.True or false: in <img>, alt describes the picture. (a) False (b) True
  15. 15.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  16. 16.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  18. 18.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  19. 19.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  20. 20.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  21. 21.True or false: HTML on its own can make links to pages. (a) True (b) False
  22. 22.True or false: <style> goes in the head. (a) True (b) False
  23. 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
  24. 24.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Good morning!</p>
    <h2>My pets</h2>
  26. 26.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
  28. 28.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) hosts websites online (d) saves our .html files
  29. 29.True or false: <input> is an empty tag. (a) False (b) True
  30. 30.Which of these goes in the head? (a) <h1> (b) <a> (c) <style> (d) <table>
  31. 31.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  32. 32.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  33. 33.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  35. 35.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  36. 36.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  37. 37.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
    <h2>My pets</h2>
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h6> or <h5>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
  39. 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </head> (d) </html>
  40. 40.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->

Answer key

  1. <a href="about.html">
  2. line 2
  3. <h1>
  4. a web server
  5. False
  6. Hello, world!
  7. about.html
  8. Language
  9. 3
  10. Yes
  11. True
  12. <!DOCTYPE html>
  13. <h1>
  14. True
  15. numbers
  16. an attribute
  17. Yes
  18. bus.jpg
  19. href
  20. <!--
  21. True
  22. True
  23. width
  24. <a>
  25. 2
  26. <
  27. 2
  28. opens web pages for us
  29. True
  30. <style>
  31. in a new tab
  32. numbers
  33. <ul>
  34. bullets
  35. a web browser
  36. No
  37. 3
  38. <h6>
  39. </html>
  40. 3

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