Professional Documents
Culture Documents
Practical 4 - Cascading Style Sheets
Practical 4 - Cascading Style Sheets
Practical 4 - Cascading Style Sheets
Page 1 of 6
OBJECTIVES
REFERENCES
http://www.w3schools.com/html/
SUBMISSION
ACTIVITIES
PART A
Add the following internal CSS code below the <title> tags.
Page 2 of 6
Note:
Setting the width of a block-level element will prevent it from stretching out
to the edges of its container to the left and right. Then, you can set the left
and right margins to auto to horizontally center that element within its
container. The element will take up the width you specify, then the
remaining space will be split evenly between the two margins.
2. Save the file and view the document in a browser. Note the updated style
for the webpage body, h1 & h2 heading and the list items as shown below.
Page 3 of 6
3. In the internal CSS, add in another styling for the terms <dt> of the
description list and view the webpage again.
Page 4 of 6
4. Try changing the values of some of the CSS attributes and view again in the
browser.
Note: CSS colour names can be found from the link below:
http://www.w3schools.com/cssref/css_colors.asp
Page 5 of 6
PART B
3. Create a table with the caption "PFP Graduation 2020" with the contents as
shown below:
4. Copy the image ICT.jpg from MEL and place into the subfolder image.
The image ICT.jpg should be placed at the top right corner of the page
and is hyperlinked to http://www.np.edu.sg/ict, and set to open in a new
tab.
The image width should be set to 50px and height set to 100px.
Set the alternate text as "ICT Logo" when the image is not available.
Page 6 of 6
5. At the bottom of the page, add "Done by " followed by your name in italics.
6. Save your file and view the document in a browser. Check if the formatting
follows accordingly to your webpage internal styling.
Hint: You may need to add in some inline styling to cater for some of the
formatting.