← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 73 · 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 line is missing its closing tag?
    line 1: <p>My pets
    line 2: <em>My best friend</em>
    line 3: <i>Cricket is fun.</i>
    (a) line 3 (b) line 2 (c) line 1
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Here is my best one. (c) Planets (d) body
  3. 3.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  4. 4.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 8; i = i + 2) {
      console.log(i);
    }
  5. 5.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
  6. 6.Which of these is a strong password? (a) Rain#Drop_42! (b) 123456 (c) password (d) riya2014
  7. 7.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
  8. 8.True or false: in <img>, width describes the picture. (a) False (b) True
  9. 9.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  10. 10.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Creative Sheet System (d) Cascading Style Sheets
  11. 11.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  12. 12.🖌️ What colour are the letters?
    h2 {
      font-size: 36px;
      color: white;
      text-align: right;
      background-color: green;
    }
    (a) red (b) green (c) white
  13. 13.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    (a) Good morning! (b) My best friend (c) I love mangoes. (d) Fun facts
  14. 14.📦 In the box model, which part is the text or picture? (a) padding (b) content (c) border (d) margin
  15. 15.🔁 What does this code print?
    let score = 14;
    if (score > 24) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  16. 16.Which of these is an empty tag? (a) <title> (b) <p> (c) <input> (d) <ul>
  17. 17.True or false: in <img>, src is read by screen readers. (a) True (b) False
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Welcome! (c) Space Facts (d) I like to read.
  19. 19.🌍 What is the domain name in this URL?
    https://kids.example.org/index.html
    (a) https (b) kids.example.org (c) school.example.in (d) /index.html
  20. 20.✍️ CSS declarations go inside which brackets? (a) { } (b) [ ] (c) < > (d) ( )
  21. 21.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  22. 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  23. 23.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus
  24. 24.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
  25. 25.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) weak (b) strong
  26. 26.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 170px;
      padding: 25px;
      border: 5px solid black;
      margin: 5px;
    }
  27. 27.📊 Which tag makes one data cell? (a) <caption> (b) <th> (c) <td> (d) <table>
  28. 28.🔁 What does this code print?
    let temp = 21;
    if (temp < 31) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  29. 29.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="email">
      <input type="number">
      <input type="password">
      <input type="date">
      <input type="submit" value="Send">
    </form>
  30. 30.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  31. 31.⚡ What does this code show?
    let name = "Riya";
    alert("Hi, " + name + "!");
    (a) Hi, Riya! (b) Riya (c) Hi, name! (d) name
  32. 32.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) makes it harder (b) helps everyone
  33. 33.🔢 When you open a web page, what comes right after “the server sends files”? (a) the browser shows it (b) you type the URL (c) DNS finds the server (d) the browser asks it
  34. 34.🎯 How many elements on a page should have the same id? (a) any number (b) 1 (c) 2 (d) 5
  35. 35.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
  36. 36.🎨 Which tag connects an outside CSS file? (a) <a> (b) <link> (c) <css> (d) <img>
  37. 37.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  39. 39.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>

Answer key

  1. line 1
  2. Planets
  3. True
  4. 6
  5. 6
  6. Rain#Drop_42!
  7. 2
  8. False
  9. -->
  10. Cascading Style Sheets
  11. <a href="about.html">
  12. white
  13. Fun facts
  14. content
  15. Play again
  16. <input>
  17. False
  18. Space Facts
  19. kids.example.org
  20. { }
  21. <ul>
  22. <!DOCTYPE html>
  23. bus.jpg
  24. the body
  25. strong
  26. 240
  27. <td>
  28. Hot
  29. 6
  30. src
  31. Hi, Riya!
  32. makes it harder
  33. the browser shows it
  34. 1
  35. .html
  36. <link>
  37. <li>
  38. 4
  39. in the body
  40. <h5>

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