Академический Документы
Профессиональный Документы
Культура Документы
Web Programming
Fall 2019
Today's schedule
- Syllabus
- Course Info
- Browsers! The Internet!
- A little bit about HTML and CSS
Check out the course website for all this and more:
https://app.schoology.com
Course code: HGG8-QD97-WTCDX
Suggestion: Bring your laptop!
Week 13 ● Middleware
Week 14 ● Security and authentication
Week 15 ● Revision
CS333 is not a class that will teach you all there is to know
about web programming.
- For example, we will not teach how to support old
browsers, legacy devices, etc.
Course info
Grades
- Syllabus
- Course Info
- Browsers! The Internet!
- A little bit about HTML and CSS
Browsers!
The Internet!
The web!
How do web pages work?
aast.edu
1. You type
in a URL,
which is the
address of
the HTML
file on the
internet.
How do web pages work?
GET
How do web pages work?
OK
How do web pages work?
... GET OK
How do web pages work?
5. The web page is loaded when all the resources are fetched
and displayed.
aast.edu
HTML and CSS
What is HTML?
<p>
HTML is <em>awesome!!!</em>
<img src="puppy.png" />
</p>
What is HTML?
https://repl.it/@SherifEl/Example-1
Basic HTML page structure
<!DOCTYPE html>
<html>
<head>
<title>CS333</title>
</head>
<body>
... contents of the page...
</body>
</html>
<!DOCTYPE html>
Metadata that <html>
doesn't appear in <head> E.g. <title>
the viewport of <title>CS 193X</title> shows up as the
the browser </head> name of the tab
<p>
HTML is <em>awesome!!!</em>
<img src="puppy.png" />
</p>
● An element usually has start and ending tags (<p> and </p>)
○ content: stuff in between start and end tags
● An element can be self-closing (img)
● An element can have attributes (src="puppy.jpg")
● Elements can contain other elements (p contains em and img)
Some HTML elements
(to place within <body>)
Top-level heading
<h1>Moby Dick</h1>
h1, h2, ... h6
Paragraph <p>Call me now.</p>
since feeling is first<br/>
Line break
who pays any attention
Image <img src="cover.png" />
<a href="google.com">click
Link
here!</a>
Strong (bold) <strong>Be BOLD</strong>
Emphasis (italic) He's my <em>brother</em> and all
Exercise: Course web page
<!DOCTYPE html>
<html>
<head>
<title>CS333</title>
</head>
<body>
<h1>CS333: Web Fun</h1>
<strong>Announcements</strong><br/>
4/3: Homework 0 is out!<br/>
4/3: Office hours are now posted.<br/>
<br/>
<a href="https://app.schoology.com/course/2221846263/materials">
View Syllabus
</a>
</body>
</html>
CSS
CSS
selector {
property: value;
}
CSS
selector {
property: value;
}
selector: Specifies the HTML element(s) to style.
property: The name of the CSS style.
value: The value for the CSS style.
<!DOCTYPE html>
<html>
<head>
<title>CS333</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>header in green</h1>
<p>contents of the page are in blue</p>
</body>
</html>
Some CSS properties
Aside: Mozilla Developer Network (MDN) is the best reference for HTML
elements and CSS properties
- The actual W3 spec is very hard to read (meant for browser
developers, not web developers)
Main ways to define CSS colors: