← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 367 · 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.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.
    <b>Hello, world!</b>
    <p>The red kite</p>
    (a) </p> (b) </b> (c) </i> (d) </h3>
  2. 2.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) Contact us (b) href (c) about.html (d) About us
  3. 3.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  4. 4.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  5. 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  6. 6.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  7. 7.True or false: in <img>, alt sets how tall it is. (a) True (b) False
  8. 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  10. 10.True or false: in <img>, alt describes the picture. (a) True (b) False
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) The full moon (c) width (d) dog.jpg
  12. 12.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
  13. 13.🔍 Which is the odd one out? (a) stores a website’s files (b) opens web pages for us (c) turns HTML into a page (d) shows pages from the web
  14. 14.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Rain today</h2>
    <h3>My best friend</h3>
    <p>My pets</p>
  15. 15.🌐 Which one stores a website’s files? (a) a code editor (b) a web server (c) a web browser
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  17. 17.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  18. 18.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) HyperText (d) Home Text
  19. 19.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.💬 Does the browser show comments on the page? (a) No (b) Yes
  21. 21.🔠 Are headings shown in bold by default? (a) Yes (b) No
  22. 22.True or false: <ol> is one item of a list. (a) False (b) True
  23. 23.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My best friend</p>
    <h2>My best friend</h2>
    <p>Rain today</p>
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <h2>Hello, world!</h2>
    line 3: <h1>Rain today
    (a) line 2 (b) line 1 (c) line 3
  27. 27.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) saves our .html files (d) has an address bar
  28. 28.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  29. 29.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  30. 30.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
  31. 31.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  32. 32.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  33. 33.True or false: <img> goes in the head. (a) True (b) False
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  35. 35.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
  36. 36.True or false: <ul> goes in the body. (a) False (b) True
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) Contact us (b) About us (c) href (d) quiz.html
  38. 38.📄 Can HTML on its own make a form? (a) Yes (b) No
  39. 39.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  40. 40.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Our school trip</p>
    <p>Our school trip</p>

Answer key

  1. </i>
  2. About us
  3. <li>
  4. a slash /
  5. 6
  6. True
  7. False
  8. in the body
  9. 200
  10. True
  11. A happy dog
  12. 2
  13. stores a website’s files
  14. 3
  15. a web server
  16. 1
  17. the body
  18. HyperText
  19. a closing tag
  20. No
  21. Yes
  22. False
  23. href
  24. 3
  25. Yes
  26. line 3
  27. saves our .html files
  28. opens it in a new tab
  29. <h1>
  30. 3
  31. a web browser
  32. <!--
  33. False
  34. 2
  35. </h2>
  36. True
  37. About us
  38. Yes
  39. to leave notes
  40. 1

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