← Your first website lesson New set →

Web Worksheet: Your First Website

HTML and CSS lesson 29: Your first website · Set 36 · 40 questions
TalentJR

Code tip (One file per job): Tags → index.html; selector { … } → style.css; let, alert, console.log → script.js. Plan → write the HTML → add CSS → test in a browser → publish. Use small letters and dashes in file names; save and refresh to see changes.

NameDateTime takenScore ___ / 40
  1. 1.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) style.css (c) script.js
  2. 2.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) test in a browser (b) add CSS styles (c) publish it online (d) write the HTML
  3. 3.True or false: body { margin: 0; } goes in index.html. (a) True (b) False
  4. 4.🚀 What is the home page file of a website usually called? (a) start.js (b) index.html (c) main.png (d) home.css
  5. 5.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) test in a browser (b) publish it online (c) add CSS styles (d) plan what to show
  6. 6.🚀 Which file should this code go in: #top { color: blue; } (a) script.js (b) style.css (c) index.html
  7. 7.True or false: .box { padding: 8px; } goes in script.js. (a) True (b) False
  8. 8.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  9. 9.🚀 Which file should this code go in: <img src="cat.png"> (a) index.html (b) style.css (c) script.js
  10. 10.🔢 To build and share your first web page, which comes LAST? (a) test in a browser (b) publish it online (c) add CSS styles (d) plan what to show
  11. 11.🔢 To build and share your first web page, which comes first: “publish it online” or “plan what to show”? (a) publish it online (b) plan what to show
  12. 12.True or false: alert(score); goes in style.css. (a) False (b) True
  13. 13.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
  14. 14.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) add CSS styles (b) plan what to show (c) publish it online (d) write the HTML
  15. 15.🚀 Which file should this code go in: alert(score); (a) index.html (b) script.js (c) style.css
  16. 16.🔢 To build and share your first web page, which comes first: “add CSS styles” or “publish it online”? (a) publish it online (b) add CSS styles
  17. 17.🚀 Which tag loads script.js into a page? (a) <js src="script.js"> (b) <a href="script.js"> (c) <script src="script.js"> (d) <link script.js>
  18. 18.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  19. 19.🚀 Which file should this code go in: alert("Hi"); (a) index.html (b) style.css (c) script.js
  20. 20.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
  21. 21.True or false: h1 { font-size: 32px; } goes in style.css. (a) False (b) True
  22. 22.True or false: p { color: red; } goes in style.css. (a) True (b) False
  23. 23.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
  24. 24.True or false: <p>Hello!</p> goes in index.html. (a) True (b) False
  25. 25.🚀 Which file should this code go in: let score = 0; (a) index.html (b) style.css (c) script.js
  26. 26.🔢 To build and share your first web page, which comes first: “plan what to show” or “publish it online”? (a) publish it online (b) plan what to show
  27. 27.🚀 Which file should this code go in: <p>Hello!</p> (a) script.js (b) style.css (c) index.html
  28. 28.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) style.css (c) script.js
  29. 29.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
  30. 30.True or false: .box { padding: 8px; } goes in style.css. (a) True (b) False
  31. 31.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) style.css (c) script.js
  32. 32.True or false: alert("Hi"); goes in script.js. (a) False (b) True
  33. 33.🚀 Which file should this code go in: p { color: red; } (a) style.css (b) script.js (c) index.html
  34. 34.True or false: h1 { font-size: 32px; } goes in script.js. (a) False (b) True
  35. 35.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the head (d) in the footer
  36. 36.True or false: let score = 0; goes in style.css. (a) False (b) True
  37. 37.True or false: let score = 0; goes in script.js. (a) True (b) False
  38. 38.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) delete the file (c) save and refresh (d) rename the folder
  39. 39.True or false: #top { color: blue; } goes in script.js. (a) True (b) False
  40. 40.🚀 Which file is best for the colours and fonts? (a) photo.jpg (b) index.html (c) script.js (d) style.css

Answer key

  1. script.js
  2. write the HTML
  3. False
  4. index.html
  5. add CSS styles
  6. style.css
  7. False
  8. No
  9. index.html
  10. publish it online
  11. plan what to show
  12. False
  13. True
  14. publish it online
  15. script.js
  16. add CSS styles
  17. <script src="script.js">
  18. True
  19. script.js
  20. False
  21. True
  22. True
  23. True
  24. True
  25. script.js
  26. plan what to show
  27. index.html
  28. index.html
  29. style.css
  30. True
  31. style.css
  32. True
  33. style.css
  34. False
  35. in the head
  36. False
  37. True
  38. save and refresh
  39. False
  40. style.css

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