46
Week 02 a new layer

Website Design, Development & Maintenance | Foundations | Week 02

Embed Size (px)

Citation preview

Page 1: Website Design, Development & Maintenance | Foundations | Week 02

Week 02a new layer

Page 2: Website Design, Development & Maintenance | Foundations | Week 02

From Last Week

What does HTML stand for?

What does CSS stand for?

What is the difference between them?

Page 3: Website Design, Development & Maintenance | Foundations | Week 02

From Last Week

What does FTP stand for?

What does HTTP stand for?

What is the difference between FTP and HTTP?

Page 4: Website Design, Development & Maintenance | Foundations | Week 02

FTP and File Structure

Page 5: Website Design, Development & Maintenance | Foundations | Week 02

Relationships

Page 6: Website Design, Development & Maintenance | Foundations | Week 02

Relationships

X

Page 7: Website Design, Development & Maintenance | Foundations | Week 02

Relationships

Page 8: Website Design, Development & Maintenance | Foundations | Week 02

Filing the Files

Page 9: Website Design, Development & Maintenance | Foundations | Week 02

Root Directory

TOP LEVEL FOLDER FOR FILES

Page 10: Website Design, Development & Maintenance | Foundations | Week 02

From the Root

/EMERSON/FIELDS/ASSIGNMENTS/WEEK01/

Page 11: Website Design, Development & Maintenance | Foundations | Week 02

rules on files and dir

all lower case

no spaces

can use ‘-’ or ‘_’ to separate words if need be

Page 12: Website Design, Development & Maintenance | Foundations | Week 02

rules in effect

/something/over there/never buy remotes/

/something/over-there/never-buy-remotes/

X

Page 13: Website Design, Development & Maintenance | Foundations | Week 02

Using an FTP Program

Page 14: Website Design, Development & Maintenance | Foundations | Week 02

default file names

the first file browsers look for is ‘index’

for us we are authoring in html

so index.html will be our default file name

Home Page = index.html

default page for each directory = index.html

Page 15: Website Design, Development & Maintenance | Foundations | Week 02

seeing it work

go to snarkygargoyle.com/inClass/

(don’t need the file name since we want index.html to show)

Page 16: Website Design, Development & Maintenance | Foundations | Week 02

keep directories logical

/inClass/week02/testing/filepath/logic

Page 17: Website Design, Development & Maintenance | Foundations | Week 02

Doing it ourselves

open up filezilla/cuteFTP/firefox

Page 18: Website Design, Development & Maintenance | Foundations | Week 02

Break

15 minutes

Page 19: Website Design, Development & Maintenance | Foundations | Week 02

Style Sheets

Ability to stylize any element of HTML (style sheet)

COLORBORDER

FONTPADDING

MARGINS

POSITION

FONT-VARIANTWIDTH

HEIGHT

Z-INDEX

Page 20: Website Design, Development & Maintenance | Foundations | Week 02

Cascading

refers to the order in which the browser reads the CSS rules

Page 21: Website Design, Development & Maintenance | Foundations | Week 02

CSS

3 Primary kinds of CSS

External (separate document)

Internal (styles in the <head>)

Inline (within each element)

Page 22: Website Design, Development & Maintenance | Foundations | Week 02

CSS

Browsers obey CSS in the order they read it

Page 23: Website Design, Development & Maintenance | Foundations | Week 02

External CSS

Page 24: Website Design, Development & Maintenance | Foundations | Week 02

Internal CSS

Page 25: Website Design, Development & Maintenance | Foundations | Week 02

Inline CSS

<p style="color:blue; font-size:12px; font-family:verdana, <p style="color:blue; font-size:12px; font-family:verdana, arial,'times new roman';">paragraph that is blue, 12px and arial,'times new roman';">paragraph that is blue, 12px and verdana</p>verdana</p>

Page 26: Website Design, Development & Maintenance | Foundations | Week 02

So Cascading means

External style sheet says all P tags are blue

Internal style sheet says all P tags are green

Inline style tag says the p tag is red

the p tag is red

IF:

THEN:

Page 27: Website Design, Development & Maintenance | Foundations | Week 02

Inline CSS

To assign styles to an element inline, we use an attribute called style

Page 28: Website Design, Development & Maintenance | Foundations | Week 02

Attribute

<p <p stylestyle="color:blue;">paragraph that is blue</p>="color:blue;">paragraph that is blue</p>

Page 29: Website Design, Development & Maintenance | Foundations | Week 02

Property

<p <p stylestyle="="colorcolor:blue;">paragraph that is blue</p>:blue;">paragraph that is blue</p>

Page 30: Website Design, Development & Maintenance | Foundations | Week 02

Value

<p <p stylestyle="color:="color:blueblue;">paragraph that is blue</p>;">paragraph that is blue</p>

Page 31: Website Design, Development & Maintenance | Foundations | Week 02

Selector

<<pp stylestyle="color:blue;">paragraph that is blue</p>="color:blue;">paragraph that is blue</p>

Page 32: Website Design, Development & Maintenance | Foundations | Week 02

Declaration

<<pp stylestyle="="color:bluecolor:blue;">paragraph that is blue</p>;">paragraph that is blue</p>

Page 33: Website Design, Development & Maintenance | Foundations | Week 02

CSS to learn

http://www.bostonshaker.com/students/css-examples.html

Page 34: Website Design, Development & Maintenance | Foundations | Week 02

2 new tags

<strong>stuff</strong>

<em>more stuff</em>

MAKES THINGS BOLD, IMPORTANT

MAKES THINGS ITALICS (EMPHASIZE)

Page 35: Website Design, Development & Maintenance | Foundations | Week 02

Lets Practice

To the Text Editor Robin!

Page 36: Website Design, Development & Maintenance | Foundations | Week 02

The Box Model

The ability to control block level elements with a series of layout controls

PADDING BORDER MARGIN

Page 37: Website Design, Development & Maintenance | Foundations | Week 02

Box ModelPADDING BORDER MARGIN

Page 38: Website Design, Development & Maintenance | Foundations | Week 02

Box Model

<p style=”border: 1px black solid; padding:2px; margin:15px;”>

some stuff in here

</p>

PADDING

BORDER

MARGIN

Page 39: Website Design, Development & Maintenance | Foundations | Week 02

Box Model

But Jason, boxes have 4 sides, what about different values?

padding: 5px;padding: 5px 10px;

padding: 3px 5px 10px 2px;

ALL SIDES ARE EQUALTOP/BOTTOM FIRST THEN LEFT/RIGHTTOP RIGHT BOTTOM LEFT

SAME LOGIC WITH ‘MARGIN’

Page 40: Website Design, Development & Maintenance | Foundations | Week 02

Box Model

Borders are a little different

border: 1px;border: 1px red;

border: 1px red solid;

YOU SET WIDTH, BROWSER ASSUMESWIDTH, COLOR, BROWSER ASSUMESYOU GAVE THE BROWSER ALL VARIABLES

LONG HAND IS USING ‘BORDER-COLOR’ | ‘BORDER-WIDTH’ | ‘BORDER-STYLE’

Page 41: Website Design, Development & Maintenance | Foundations | Week 02

Inheritanceelements inside of other elements will inherit its values unless you tell it otherwise

<p style=”color:red”>

<strong>some stuff in here</strong>

</p>

<p style=”color:red”>

<strong style=”color:blue;”>some stuff in here</strong>

</p>

Page 42: Website Design, Development & Maintenance | Foundations | Week 02

Lets rock...

Page 43: Website Design, Development & Maintenance | Foundations | Week 02

Anchors

making links uses a tag called the anchor

<a></a>

Page 44: Website Design, Development & Maintenance | Foundations | Week 02

Anchors

the anchor tag also uses an attribute

hrefHYPERTEXT REFERENCE

Page 45: Website Design, Development & Maintenance | Foundations | Week 02

Anchors

the attribute ‘href’ needs a definition, no?

href=”http://www.google.com”WHEN YOU USE AN ‘HTTP’ REFERENCE YOU ARE CREATING AN ABSOLUTE LINK.

THERE IS ANOTHER TYPE OF LINK CALLED ‘RELATIVE’ - COMING SOON

Page 46: Website Design, Development & Maintenance | Foundations | Week 02

Anchors

put it all together

<a href=”http://www.google.com”>google</a>