1-3 Basic CSS

So far, we've only focused on content for a webpage using HTML. What else might you want to change about this webpage about Smart Phone Safety to make it more engaging or attractive?

CSS Syntax - used for design of a website

Common CSS Properties

-color (text color)


-background-color (color behind text)

-text-align (center, left, right)

-font-size (measured in pixels abbreviated as px)

-margin (in pixels)

-height (in pixels)

-width (in pixels)

CSS on W3 Schools

CSS Colors (These 3 options would allow be the color Red)

1) Use an exact color name:

color: red;

2) Using an RGB value:

color: rgb(255, 0, 0);

3) Using a hex value:

color: #ff0000;

This allows you to customize the colors you use to make your website more dynamic!

Color List

HTML Color Codes

Adding Comments to Your Code


<!-- Write your comments here -->


/* Write your comments here */

Why would adding comments to your code be important?

Note: Shortcut to comment out your code: Select the text, Hold Ctrl Key, click the ? Key


Standard Deliverable

Open up your “History of Computers” codepen. Click the Fork button to start a new codepen file. Rename it to “Updated History of Computers”.

Required Elements

1)Add design for each part of your website.

2)You can change the font-family, font-size, color, background-color, or anything else that you want to change.

3)Add comments to your CSS for each thing you change. You can do it like this:


Advanced Deliverable

Complete the following by searching the reference material on http://W3schools.com or another site.

1)Add a border of your choice to one of the elements on your page.

2)Change the margin for one of the elements on your page.

3)Add comments to your code for these changes.

Code Review Exercises:

1) CSS Basics - Colorful Creature

2) Font Families - Fancy Font Families

3) Font Sizes - Great Big Font Sizes