← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 476 · 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.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  2. 2.⚡ Where does console.log() show its output? (a) in the address bar (b) on the printer (c) in the console (d) on the title bar
  3. 3.🖌️ What colour are the letters?
    p {
      text-align: left;
      color: red;
      background-color: black;
      font-size: 28px;
    }
    (a) red (b) black (c) blue
  4. 4.🖌️ What colour are the letters?
    h2 {
      text-align: right;
      font-size: 40px;
      background-color: red;
      color: orange;
    }
    (a) red (b) yellow (c) orange
  5. 5.✍️ What is the selector in this CSS rule?
    h1 {
      border: 2px solid;
      font-weight: bold;
      background-color: yellow;
    }
    (a) p (b) bold (c) h1 (d) border
  6. 6.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  7. 7.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) </html> (d) <body>
  8. 8.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  9. 9.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 5;
    }
    console.log(total);
  10. 10.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  11. 11.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.net/games/chess.html
    (a) Yes (b) No
  12. 12.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  13. 13.🧩 Which language adds space around boxes? (a) CSS (b) JavaScript (c) HTML
  14. 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  16. 16.Which of these is the border? (a) the gap to other boxes (b) space outside the border (c) the line round the box (d) space inside the border
  17. 17.What does font-family do? (a) makes the text bold (b) picks the font style (c) sets the letter colour (d) makes letters bigger
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
  19. 19.⚖️ What colour is the text of this element?
    <p class="menu" id="end">Hi</p>
    CSS:
    #end { color: white; }
    #end { color: red; }
    (a) green (b) orange (c) white (d) red
  20. 20.💪 Which justify-content value packs boxes at the end? (a) center (b) space-between (c) flex-end (d) flex-start
  21. 21.Which of these is a closing tag? (a) <li> (b) <h1> (c) </body> (d) <p>
  22. 22.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 110px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  23. 23.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
  24. 24.🔗 Which address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) news.html (b) art.html (c) Maths fun (d) quiz.html
  25. 25.📊 Which tag holds the whole table? (a) <td> (b) <caption> (c) <table> (d) <tr>
  26. 26.📊 In a table, which tag is a row? (a) <th> (b) <tb> (c) <td> (d) <tr>
  27. 27.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  29. 29.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  30. 30.Which of these is an opening tag? (a) <b> (b) </h1> (c) </li> (d) </title>
  31. 31.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  32. 32.🚀 What is the home page file of a website usually called? (a) main.png (b) start.js (c) index.html (d) home.css
  33. 33.Which of these is the content? (a) the gap to other boxes (b) the text or picture (c) the gap round content (d) space inside the border
  34. 34.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
  35. 35.True or false: in <img>, width describes the picture. (a) False (b) True
  36. 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  37. 37.🌍 Which one sends the page back? (a) the URL (b) the browser (c) HTTPS (d) the server
  38. 38.⚡ What does this code print? (Look at the quotes!)
    let x = "6";
    let y = 9;
    console.log(x + y);
    (a) 15 (b) Error (c) 69
  39. 39.True or false: CSS reacts to a button click. (a) True (b) False
  40. 40.📝 Which input type hides what you type? (a) text (b) password (c) email (d) date

Answer key

  1. Yes
  2. in the console
  3. red
  4. orange
  5. h1
  6. in the same tab
  7. </html>
  8. 2
  9. 20
  10. opens it in a new tab
  11. Yes
  12. <h2>
  13. CSS
  14. in the body
  15. 3
  16. the line round the box
  17. picks the font style
  18. src
  19. red
  20. flex-end
  21. </body>
  22. 30
  23. padding
  24. art.html
  25. <table>
  26. <tr>
  27. in a new tab
  28. numbers
  29. True
  30. <b>
  31. <
  32. index.html
  33. the text or picture
  34. False
  35. False
  36. <!DOCTYPE html>
  37. the server
  38. 69
  39. False
  40. password

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