← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 113 · 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.🧩 Which language changes the text size? (a) HTML (b) JavaScript (c) CSS
  2. 2.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 30px;
      }
    }
  3. 3.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) test in a browser (c) write the HTML (d) publish it online
  4. 4.🔍 One closing tag is missing. Which one?
    <small>Fun facts</small>
    <b>Rain today
    <u>My best friend</u>
    (a) </small> (b) </em> (c) </b> (d) </u>
  5. 5.What does text-align do? (a) colours behind the text (b) centres a heading (c) sets the letter colour (d) makes the text bold
  6. 6.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <strong/> (d) <\strong>
  7. 7.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) tiger.jpg (b) Our school bus (c) bus.jpg (d) fort.jpg
  8. 8.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) alt (d) width
  9. 9.True or false: padding is space inside the border. (a) False (b) True
  10. 10.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  11. 11.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) an element name (d) a closing tag
  12. 12.Which of these is not safe to do online? (a) tell a trusted adult (b) check for https first (c) keep passwords secret (d) type a password on http
  13. 13.🔗 Where does this link open?
    <a href="art.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  14. 14.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  15. 15.Which of these is padding? (a) a solid or dotted edge (b) the line round the box (c) space outside the border (d) space inside the border
  16. 16.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 25px;
      border: 3px solid black;
      margin: 15px;
    }
  18. 18.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  19. 19.⚡ What does this code show?
    let name = "Meera";
    console.log("Welcome, " + name + "!");
    (a) Meera (b) name (c) Welcome, Meera! (d) Welcome, name!
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Rain today (c) Cricket is fun. (d) I love mangoes.
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) width (c) A happy dog (d) The full moon
  22. 22.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  23. 23.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  25. 25.📝 Which tag holds a whole form? (a) <input> (b) <ol> (c) <form> (d) <table>
  26. 26.⚖️ What colour is the text of this element?
    <h2 class="big" id="top">Hi</h2>
    CSS:
    h2 { color: green; }
    .big { color: red; }
    (a) black (b) orange (c) red (d) green
  27. 27.⚖️ 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
  28. 28.True or false: HTML on its own can keep a high score. (a) True (b) False
  29. 29.🌈 Which colour is #00ffff? (a) magenta (b) yellow (c) bright green (d) cyan
  30. 30.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  31. 31.🎯 Which CSS selector matches this element?
    <span class="big" id="intro">Hello</span>
    (a) p (b) #big (c) #intro (d) #main
  32. 32.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
  33. 33.🎯 What kind of selector is .star? (a) an element selector (b) an id selector (c) a class selector
  34. 34.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) My pets (c) Cricket is fun.
  35. 35.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="date">
      <input type="submit" value="Send">
    </form>
  36. 36.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  37. 37.⚖️ What colour is the text of this element?
    <h1 class="red" id="intro">Hi</h1>
    CSS:
    .red { color: green; }
    h1 { color: yellow; }
    (a) black (b) green (c) yellow (d) orange
  38. 38.✍️ What is the selector in this CSS rule?
    .box {
      font-weight: bold;
      padding: 8px;
    }
    (a) font-weight (b) h2 (c) 8px (d) .box
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
  40. 40.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 190px;
      padding: 5px;
      border: 3px solid black;
      margin: 15px;
    }

Answer key

  1. CSS
  2. 24
  3. plan what to show
  4. </b>
  5. centres a heading
  6. </strong>
  7. bus.jpg
  8. alt
  9. True
  10. <ul>
  11. an attribute
  12. type a password on http
  13. in the same tab
  14. to describe the image
  15. space inside the border
  16. an empty tag
  17. 176
  18. 2
  19. Welcome, Meera!
  20. Rain today
  21. A happy dog
  22. Yes
  23. an empty tag
  24. 2
  25. <form>
  26. red
  27. the later one
  28. False
  29. cyan
  30. easy to read
  31. #intro
  32. makes it harder
  33. a class selector
  34. My best friend
  35. 3
  36. href
  37. green
  38. .box
  39. 2
  40. 236

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