← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 539 · 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.🔍 One closing tag is missing. Which one?
    <i>My best friend
    <h2>My pets</h2>
    <h3>Our school trip</h3>
    (a) </h2> (b) </h3> (c) </i> (d) </p>
  2. 2.What is <input type="date"> for? (a) hides what you type (b) takes only numbers (c) picks a day (d) sends the form
  3. 3.📊 Which tag makes a heading cell? (a) <caption> (b) <table> (c) <td> (d) <th>
  4. 4.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  5. 5.True or false: a code editor hosts websites online. (a) True (b) False
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  7. 7.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      font-style: italic;
      font-size: 20px;
    }
  8. 8.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) answers page requests (d) has an address bar
  9. 9.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 9; i++) {
      total = total + 8;
    }
    console.log(total);
  10. 10.🎯 What kind of selector is .menu? (a) an element selector (b) an id selector (c) a class selector
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  12. 12.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 6; i++) {
      console.log("Hi");
    }
  13. 13.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
  14. 14.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 3;
    console.log(x + y);
    (a) Error (b) 5 (c) 23
  15. 15.🎯 Which sign starts an id selector? (a) # (b) . (c) & (d) @
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
    <h3>Good morning!</h3>
    <p>Rain today</p>
  17. 17.🎯 Which CSS selector matches this element?
    <span class="star" id="top">Hello</span>
    (a) #top (b) .menu (c) #star (d) p
  18. 18.Which of these is a closing tag? (a) <li> (b) <h1> (c) <body> (d) </body>
  19. 19.🔐 Is password a strong or a weak password? (a) weak (b) strong
  20. 20.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
  21. 21.🎯 What kind of selector is li? (a) a class selector (b) an id selector (c) an element selector
  22. 22.🔢 When you open a web page, what comes right after “the browser asks it”? (a) DNS finds the server (b) the server sends files (c) you type the URL (d) the browser shows it
  23. 23.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      width: 300px;
      font-weight: bold;
    }
  24. 24.📝 What does <p> make? (a) a picture (b) a paragraph (c) a table (d) a link
  25. 25.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h5>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
  27. 27.🎯 Which element does the selector h2 style? (a) <div class="menu"> (b) <h2 class="menu"> (c) <li> (d) <span id="hero">
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) magenta
  29. 29.True or false: .star is a class selector. (a) True (b) False
  30. 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  32. 32.🖌️ What colour are the letters?
    h1 {
      background-color: yellow;
      text-align: left;
      font-size: 36px;
      color: green;
    }
    (a) yellow (b) purple (c) green
  33. 33.🧩 Which language shows a pop-up message? (a) HTML (b) CSS (c) JavaScript
  34. 34.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  35. 35.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
  36. 36.⚡ Which JavaScript word writes in the console? (a) let (b) if (c) for (d) console.log()
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  38. 38.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  39. 39.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) shows line numbers (d) has an address bar
  40. 40.True or false: “add alt text to images” helps everyone use the page. (a) False (b) True

Answer key

  1. </i>
  2. picks a day
  3. <th>
  4. <h1>
  5. False
  6. 1
  7. 2
  8. has an address bar
  9. 72
  10. a class selector
  11. alt
  12. 5
  13. easy to read
  14. 23
  15. #
  16. 3
  17. #top
  18. </body>
  19. weak
  20. an element selector
  21. an element selector
  22. the server sends files
  23. 2
  24. a paragraph
  25. 8
  26. <h5>
  27. <h2 class="menu">
  28. black
  29. True
  30. in the body
  31. <h5>
  32. green
  33. JavaScript
  34. 12
  35. a code editor
  36. console.log()
  37. 2
  38. width
  39. stores a website’s files
  40. True

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