Web Worksheet: Your First Website
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.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) style.css (c) script.js
- 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.True or false: body { margin: 0; } goes in index.html. (a) True (b) False
- 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.🔢 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.🚀 Which file should this code go in: #top { color: blue; } (a) script.js (b) style.css (c) index.html
- 7.True or false: .box { padding: 8px; } goes in script.js. (a) True (b) False
- 8.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
- 9.🚀 Which file should this code go in: <img src="cat.png"> (a) index.html (b) style.css (c) script.js
- 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.🔢 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.True or false: alert(score); goes in style.css. (a) False (b) True
- 13.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
- 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.🚀 Which file should this code go in: alert(score); (a) index.html (b) script.js (c) style.css
- 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.🚀 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.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
- 19.🚀 Which file should this code go in: alert("Hi"); (a) index.html (b) style.css (c) script.js
- 20.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
- 21.True or false: h1 { font-size: 32px; } goes in style.css. (a) False (b) True
- 22.True or false: p { color: red; } goes in style.css. (a) True (b) False
- 23.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
- 24.True or false: <p>Hello!</p> goes in index.html. (a) True (b) False
- 25.🚀 Which file should this code go in: let score = 0; (a) index.html (b) style.css (c) script.js
- 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.🚀 Which file should this code go in: <p>Hello!</p> (a) script.js (b) style.css (c) index.html
- 28.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) style.css (c) script.js
- 29.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
- 30.True or false: .box { padding: 8px; } goes in style.css. (a) True (b) False
- 31.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) style.css (c) script.js
- 32.True or false: alert("Hi"); goes in script.js. (a) False (b) True
- 33.🚀 Which file should this code go in: p { color: red; } (a) style.css (b) script.js (c) index.html
- 34.True or false: h1 { font-size: 32px; } goes in script.js. (a) False (b) True
- 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.True or false: let score = 0; goes in style.css. (a) False (b) True
- 37.True or false: let score = 0; goes in script.js. (a) True (b) False
- 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.True or false: #top { color: blue; } goes in script.js. (a) True (b) False
- 40.🚀 Which file is best for the colours and fonts? (a) photo.jpg (b) index.html (c) script.js (d) style.css
Answer key
- script.js
- write the HTML
- False
- index.html
- add CSS styles
- style.css
- False
- No
- index.html
- publish it online
- plan what to show
- False
- True
- publish it online
- script.js
- add CSS styles
- <script src="script.js">
- True
- script.js
- False
- True
- True
- True
- True
- script.js
- plan what to show
- index.html
- index.html
- style.css
- True
- style.css
- True
- style.css
- False
- in the head
- False
- True
- save and refresh
- False
- style.css
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids