CxD Archive
Intro to Informatics and Web Development
Intro to Informatics and Web Development
  • Intro to Informatics and Web Development - Front Page
  • 1-1 Intro to Code References
  • 1-2 Basic HTML
  • 1-3 Basic CSS
  • 1-4 Classes and IDs
  • 1-5 Javascript
  • 1-6 Javascript Objects
  • 1-7 If...Else Statements
  • 1-8 For Loops
  • 2-1 Intro to User and Product Research
  • 2-2 Product Investigation
  • 2-3 Interviews
  • 2-4 Personas
  • 3-1 Intro to Interaction Design
  • 3-2 Sketching Interfaces
  • 3-3 Prototypes and Interaction Storyboards
  • 1-8 For Loops
Powered by GitBook
On this page
  • CSS Syntax - used for design of a website
  • Common CSS Properties
  • CSS Colors (These 3 options would allow be the color Red)
  • Adding Comments to Your Code
  • Assignment
  • Standard Deliverable
  • Advanced Deliverable
  • Code Review Exercises:
Export as PDF

1-3 Basic CSS

Previous1-2 Basic HTMLNext1-4 Classes and IDs

Last updated 6 years ago

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)

-font-family

-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 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!

Adding Comments to Your Code

HTML:

<!-- Write your comments here -->

CSS:

/* 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

Assignment

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

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:

-

Complete the following by searching the reference material on or another site.

1) CSS Basics -

2) Font Families -

3) Font Sizes -

CSS on W3 Schools
Color List
HTML Color Codes
http://W3schools.com
Colorful Creature
Fancy Font Families
Great Big Font Sizes