← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 656 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
  2. 2.True or false: img is a class selector. (a) False (b) True
  3. 3.💪 Which flexbox property picks row or column? (a) gap (b) flex-direction (c) justify-content (d) display: flex
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Easy snacks (b) Space Facts (c) Mars is red. (d) index.html
  5. 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  6. 6.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  7. 7.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>Good morning!</h3>
    <p>Good morning!</p>
    <p>My best friend</p>
  8. 8.Which of these is a weak password? (a) Mango#Kite29! (b) Kite_Fl1es@Dawn (c) riya2014 (d) Blue@Tiger_74
  9. 9.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My pets</h2>
    <p>My pets</p>
  10. 10.Which of these is true of a web browser? (a) sends pages over the net (b) stores a website’s files (c) shows line numbers (d) has an address bar
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  12. 12.🖌️ What colour are the letters?
    h1 {
      text-align: right;
      font-size: 28px;
      background-color: yellow;
      color: red;
    }
    (a) yellow (b) white (c) red
  13. 13.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  14. 14.Which of these is a closing tag? (a) </li> (b) <body> (c) <p> (d) <li>
  15. 15.📝 Which input type is for one line of words? (a) submit (b) text (c) date (d) password
  16. 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  17. 17.True or false: HTML on its own can make tables. (a) False (b) True
  18. 18.True or false: padding is a solid or dotted edge. (a) False (b) True
  19. 19.True or false: <img src="cat.png"> goes in index.html. (a) True (b) False
  20. 20.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  21. 21.🧩 Which language sets colours and fonts? (a) HTML (b) CSS (c) JavaScript
  22. 22.Which of these is true of <footer>? (a) holds the main content (b) holds a news story (c) holds the menu of links (d) sits at the bottom
  23. 23.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 12px;
      }
    }
    (a) No (b) Yes
  24. 24.True or false: a web server hosts websites online. (a) True (b) False
  25. 25.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  26. 26.✍️ How does a CSS comment start? (a) // (b) # (c) <!-- (d) /*
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) blue (d) cyan
  28. 28.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) about.html (b) Contact us (c) Visit the site (d) href
  29. 29.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  30. 30.🚀 What is the home page file of a website usually called? (a) index.html (b) main.png (c) start.js (d) home.css
  31. 31.🔁 How many numbers does this code print?
    for (let i = 0; i < 14; i = i + 3) {
      console.log(i);
    }
  32. 32.True or false: h1 { font-size: 32px; } goes in style.css. (a) False (b) True
  33. 33.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) saves our .html files (d) opens web pages for us
  34. 34.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  35. 35.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) the first one (d) neither
  36. 36.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <h3>My best friend</h3>
  37. 37.What does justify-content: flex-end do? (a) packs boxes at the start (b) equal gaps, none at ends (c) packs boxes at the end (d) puts boxes in the middle
  38. 38.🧭 How many <main> parts should a page have? (a) none (b) one (c) three (d) ten
  39. 39.🎨 One CSS file can style how many pages? (a) many pages (b) only one word (c) only one image (d) no pages
  40. 40.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      width: 300px;
      margin: 10px;
      padding: 8px;
    }

Answer key

  1. 2
  2. False
  3. flex-direction
  4. Space Facts
  5. <a href="about.html">
  6. 5
  7. 2
  8. riya2014
  9. 2
  10. has an address bar
  11. 350
  12. red
  13. <li>
  14. </li>
  15. text
  16. a slash /
  17. True
  18. False
  19. True
  20. <ul>
  21. CSS
  22. sits at the bottom
  23. Yes
  24. True
  25. an element selector
  26. /*
  27. bright green
  28. Contact us
  29. an attribute
  30. index.html
  31. 5
  32. True
  33. saves our .html files
  34. No
  35. the later one
  36. 3
  37. packs boxes at the end
  38. one
  39. many pages
  40. 3

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