html & css

21
J 187 – Introduction to Interactive Media FROM DESIGN TO DEV

Upload: lexinamer

Post on 13-Apr-2017

756 views

Category:

Design


8 download

TRANSCRIPT

Page 1: HTML & CSS

J 187 – Introduction to Interactive Media

FROM DESIGN TO DEV

Page 2: HTML & CSS

J 187 – Introduction to Interactive Media

HTML: HyperText Markup Language

CSS: Cascading StyleSheet

JS: JavaScript

What makes a webpage?

Page 3: HTML & CSS

J 187 – Introduction to Interactive Media

What do they do?

Page 4: HTML & CSS

J 187 – Introduction to Interactive Media

Coding: It’s like building a house

Page 5: HTML & CSS

J 187 – Introduction to Interactive Media

Essentially:HTML is how two computers speak to each other over the internet.

Web sites are what they say.

HTML is "spoken" by two computers:1. Client

The client is used by the person surfing the net, such as the computer you are looking at right now.

2. ServerA server stores and distributes websites over the net.

I have a server where I store this web site.

How It Works

Page 6: HTML & CSS

J 187 – Introduction to Interactive Media

HTML

Page 7: HTML & CSS

J 187 – Introduction to Interactive Media

Why is HTML so important?

Page 8: HTML & CSS

J 187 – Introduction to Interactive Media

HTML Basics

<tag> Text </tag>

start tag end tagcontent

HTML uses markup tags to describe elements on a page.

Page 9: HTML & CSS

J 187 – Introduction to Interactive Media

Basic HTML Document

<!DOCTYPE html> <html>

<head> <title>Example Web Page</title>

</head>

<body> <h1>Example Page</h1> <p>This is a paragraph</p> <a href=“link.html”>Web link</a> <! - - this is a comment in the code - ->

</body> </html>

= tag

= text on webpage

= comment

Page 10: HTML & CSS

J 187 – Introduction to Interactive Media

Two types of HTML Tags

Page 11: HTML & CSS

J 187 – Introduction to Interactive Media

There are about 80 HTML tags

Page 12: HTML & CSS

J 187 – Introduction to Interactive Media

CSS

Page 13: HTML & CSS

J 187 – Introduction to Interactive Media

What is CSS?

• CSS describes how HTML elements are to be displayed on screen, paper, or in other media

• CSS saves a lot of work. It can control the layout of multiple web pages all at once

• Internal stylesheets are stored in the <head> part of the HTML file

• External stylesheets are stored in CSS files (something.css)

Page 14: HTML & CSS

J 187 – Introduction to Interactive Media

CSS Basics

h1 { color: red; font-size: 12px; }

selector

property

declarations

value property value

Page 15: HTML & CSS

J 187 – Introduction to Interactive Media

Basic CSS Document

= selector

= property

= value

body { font-size: 12px; color: red;

}

h1 { font-weight: bold; background- color: blue;

}

#myboxhere { width: 300px; height: 200px;

}

= declarations

Page 16: HTML & CSS

J 187 – Introduction to Interactive Media

There are endless CSS tags

They are both pre-defined and self-defined

Page 17: HTML & CSS

J 187 – Introduction to Interactive Media

HTML and CSS working together

Page 18: HTML & CSS

J 187 – Introduction to Interactive Media

GETTING STARTED

Page 19: HTML & CSS

J 187 – Introduction to Interactive Media

What we need to write code

• A text editor (especially one made for code writing) Komodo Edit: http://komodoide.com/komodo-edit/

• An Internet browser (preferably Google Chrome)

Page 20: HTML & CSS

J 187 – Introduction to Interactive Media

Staying Organized

• Filenames / extensions

• Naming conventions

Page 21: HTML & CSS

J 187 – Introduction to Interactive Media

Domain and Server

Server: Webfaction.com

Domain Name: name.com

Cost: $10-12 per year for domain and $10 per month for server