Download presentation
Presentation is loading. Please wait.
1
Unit C in class EXERCISE
2
Download the file samplec.txt and save it as samplec.html
Go to : Download the file samplec.txt and save it as samplec.html Change the title to your group name. Add a comment with your names. Add the begin and end style tags in the head section. Save and view in Chrome.
3
Add style rules for the body element that will give body a background color based on your group.
Akitas wheat Bulldogs LightSteelBlue Corgis coral Dachshunds PaleGreen English Setter Foxhounds Great Danes Havanese
4
Add style rules to horizontally align the text of any h1s based on your group.
Akitas center Bulldogs right Corgis Dachshunds English Setter Foxhounds Great Danes Havanese
5
Add an id rule named "text1" that will horizontally align the text to the center. Use the "text1" id rule on the paragraph as follows: Akitas Make sure your dog has Bulldogs Try on your costume Corgis Pumpkins and corn Dachshunds Your door will be English Setter Dogs are very curious Foxhounds Do not dress your Great Danes Chocolate (especially dark Havanese Even if you are
6
Add an id rule named "text2" with the following: width: 75%; Add a division that uses this rule as follows: When viewing the page, make its width narrower so that you can see the 75% take effect. div starts after div ends before Akitas Pre Halloween night Halloween night Bulldogs Post Halloween Corgis No scardey cats allowed Dachshunds English Setter Foxhounds Great Danes Havanese
7
Add a class named "text3" that will make text color orange
Add a class named "text3" that will make text color orange. Use this class on the following 3 paragraphs. Paragraph 1 Paragraph 2 Paragraph 3 Akitas Try on your costume Your door will be Chocolate (especially dark Bulldogs Pumpkins and corn Do not dress Corgis Even if you are Dachshunds Dogs are very English Setter Foxhounds Great Danes Havanese
8
Add a single style rule to make the text of h2 and h3 elements be the color as follows.
Akitas DarkRed Bulldogs Purple Corgis Yellow Dachshunds English Setter Purple Foxhounds Great Danes Havanese
9
Print the source code for samplec. html and hand in to your teacher
Print the source code for samplec.html and hand in to your teacher. But wait. There's more. Let's make an external style sheet.
10
Save the samplec.html file with the name samplec2.html
Copy the style rules and paste them into a new text file. DO NOT INCLUDE THE <style> and </style> TAGS. Save this file with the name samplec.css In samplec2.html delete all of the embedded styles including the <style> and </style> tags and add a link statement to the samplec.css file. Test samplec2.html in your browser and make any corrections as needed.
11
That's all folks.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.