← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 7 · 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.🔐 Is Chai$Cup_19x a strong or a weak password? (a) weak (b) strong
  2. 2.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  3. 3.What does color do? (a) picks the font style (b) sets the letter colour (c) makes the text bold (d) centres a heading
  4. 4.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 22px;
      }
    }
  5. 5.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  6. 6.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 5px;
      border: 2px solid black;
      margin: 5px;
    }
  7. 7.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  8. 8.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  9. 9.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
  10. 10.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
  11. 11.✍️ Which sign goes between a property and its value? (a) : (b) = (c) ; (d) -
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
  13. 13.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) <!DOCTYPE html> (d) </body>
  14. 14.🌍 What is the path in this URL?
    http://learn.example.com/art/gallery.html
    (a) learn.example.com (b) /news/today.html (c) http (d) /art/gallery.html
  15. 15.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
  16. 16.🖌️ Where does the text sit on its line?
    h2 {
      color: yellow;
      background-color: blue;
      font-size: 24px;
      text-align: left;
    }
    (a) in the middle (b) on the left (c) on the right
  17. 17.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 7;
    console.log(x + y);
    (a) 37 (b) Error (c) 10
  18. 18.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  19. 19.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
  20. 20.🔁 How many times does this code print “Hi”?
    for (let i = 0; i <= 6; i++) {
      console.log("Hi");
    }
  21. 21.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) index.html (c) script.js
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) Fun facts (b) My pets (c) Our school trip (d) Hello, world!
  23. 23.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      color: red;
      width: 300px;
    }
  24. 24.📦 In the box model, which part is the line round the box? (a) content (b) margin (c) padding (d) border
  25. 25.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  26. 26.💬 Does the browser show comments on the page? (a) No (b) Yes
  27. 27.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <header> (c) <footer> (d) <nav>
  29. 29.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) shows line numbers (d) answers page requests
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) width (b) Our school bus (c) bus.jpg (d) An old fort
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  32. 32.🧭 Why use <nav> instead of <div> for a menu? (a) it loads faster (b) it makes text red (c) it tells its meaning (d) it adds pictures
  33. 33.Which of these is not safe to do online? (a) think before you post (b) use a nickname in games (c) share your password (d) keep passwords secret
  34. 34.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  35. 35.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Papaya</td><td>Litchi</td></tr>
    </table>
  36. 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  37. 37.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      color: red;
      text-align: center;
      width: 300px;
    }
  38. 38.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <head> (c) <!DOCTYPE html> (d) </html>
  39. 39.True or false: <title> goes in the head. (a) False (b) True
  40. 40.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. strong
  2. href
  3. sets the letter colour
  4. 20
  5. Yes
  6. 84
  7. <a>
  8. <!--
  9. to describe the image
  10. 16
  11. :
  12. 2
  13. </html>
  14. /art/gallery.html
  15. <ol>
  16. on the left
  17. 37
  18. a slash /
  19. the later one
  20. 7
  21. index.html
  22. Hello, world!
  23. 2
  24. border
  25. Yes
  26. No
  27. in the head
  28. <footer>
  29. shows line numbers
  30. Our school bus
  31. 6
  32. it tells its meaning
  33. share your password
  34. <a href="about.html">
  35. 8
  36. a web browser
  37. 3
  38. <!DOCTYPE html>
  39. True
  40. a closing tag

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