74
Computer Science E-1 Lecture 8: Web Development

Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Computer Science E-1

Lecture 8: Web Development

Page 2: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Exam II

Page 3: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Review 4/22 7:30-8:30pm

Page 4: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Web Server

Page 5: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name
Page 6: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

HTML

Page 7: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<h1>CSCI E-1</h1>

Page 8: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<h1>CSCI E-1</h1>

Page 9: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<h1>CSCI E-1</h1>

Page 10: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<h1>CSCI E-1</h1>

Page 11: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<!doctype html>

Page 12: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<html>

Page 13: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<head>

Page 14: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<title>Page title</title>

Page 15: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<body>

Page 16: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<!doctype html><html> <head>...</head> <body>...</body></html>

Page 17: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<p>Paragraph text</p>

Page 18: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<b>Bold text</b>

Page 19: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<i>Italicized text</i>

Page 20: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<b><i>Bold and italic</i></b>

Page 21: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li></ul>

Page 22: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li></ol>

Page 23: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<table> <tr> <td>table cell</td> </tr></table>

Page 24: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

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

Page 25: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<img src=“cat.jpg” />

Page 26: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 27: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Valid HTML

Page 28: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

http://validator.w3.org/

Page 29: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

CSS

Page 30: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Selectors

Page 31: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Selectors

• p

Page 32: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Selectors

• p

• #foo

• <p id=“foo”>

Page 33: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Selectors

• p

• #foo

• <p id=“foo”>

• .bar

• <p class=“bar”>

Page 34: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Rules

Page 35: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 36: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 37: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 38: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 39: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 40: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#foo { color: blue;}

Page 41: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

.bar { background: red; width: 300px;}

Page 42: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

p { font-size: 18px;}

Page 43: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Box Model

Page 44: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Box Model

Page 45: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

#navbar a { margin: 10px;}

Page 46: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

h1, p { padding: 10px;}

Page 47: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Block vs. Inline

Page 48: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<style>

Page 49: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 50: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<link rel=“stylesheet” href=“...” />

Page 51: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 52: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Layout

Page 53: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<div>

Page 54: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<span>

Page 55: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

<!-- comments -->

Page 56: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 57: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Bootstrap

Page 59: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

CSS Grid

Page 60: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name
Page 61: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name
Page 62: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 63: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Flat UI

Page 65: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Example

Page 66: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Setting up a Website

Page 67: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Setting up a Website

• find a domain name

Page 69: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Registrars

• GoDaddy

• NameCheap

• Network Solutions

• Name.com

Page 70: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Setting up a Website

• find a domain name

• find a web host

Page 71: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Web Hosts

• 1&1

• BlueHost

• DreamHost

• HostGator

• Linode

Page 72: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Setting up a Website

• find a domain name

• find a web host

• point the domain to the host

Page 73: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Setting up a Website

• find a domain name

• find a web host

• point the domain to the host

• upload files via FTP/SFTP

Page 74: Computer Science E-1cdn.computerscience1.net/2013/spring/lectures/8/lecture8.pdf · 2013. 4. 18. · • BlueHost • DreamHost • ... Setting up a Website • find a domain name

Computer Science E-1

Lecture 8: Web Development