Lab 02
Lab 02
(503073)
Lab 2
Objective:
This week, you will enhance your understanding of CSS by styling a set of provided HTML
files. The given HTML files contain only structural markup and lack any styling. Your task
is to create and apply CSS rules to improve the visual appearance of these pages, aligning
Key Requirements:
- CSS Styling: Write CSS code to style the pages according to the reference images.
- Non-Intrusive HTML Editing: You are not permitted to modify the HTML code
- Separate Stylesheet: Place your CSS code in a standalone file (e.g., style.css) and
link it to the HTML files using the <link> tag in the <head> section.
Before beginning the exercises, ensure you have reviewed the tutorial videos
Create a .black-button class to style a button as shown in the images. The button should
have a black background, white text, and slightly rounded corners. On hover, its
background color should transition smoothly to gray (#808080) over 0.5 seconds and
revert when the mouse leaves. Use the :hover pseudo-class and the transition property to
You are provided with an HTML file containing a bare table that lists Apple products. Your
The table should span the full width of the container, with borders collapsed for a clean
layout. Apply padding and center-align the text in each cell, and make sure the header
row has a distinct background color with bold text. Use alternating row colors to improve
readability and apply a hover effect that highlights rows when the mouse is over them.
Figure 3. HTML page with CSS applied when running on tablet devices
In this exercise, you are tasked with creating a full-width, full-height container that uses
CSS Grid to display a grid with 3 rows and 4 columns. Each grid cell should contain
centered text. The container should take up the entire viewport, and each cell should have
a background color with centered text. Add appropriate spacing between the cells using
grid gaps.