bob:s3cr3t@www.
example.com:8080
port
optional
default is 80
range: 1-65,535
Slide 9
Slide 9 text
bob:s3cr3t@www.
example.com:8080
authentication credentials
optional
rarely used, legacy
not how modern web apps handle logins
Slide 10
Slide 10 text
reddit.com/r/IAmA/top
path
convention to omit “index.html”
slashes “/” denote hierarchy
leading slash is the root directory
reference current level with single dot “.”
can be relative by using double dot “..”
Slide 11
Slide 11 text
Current page:
reddit.com/r/IAmA/top
Link:
./new
Result:
reddit.com/r/IAmA/new
Slide 12
Slide 12 text
Current page:
reddit.com/r/IAmA/top
Link:
new
Result:
reddit.com/r/IAmA/new
Slide 13
Slide 13 text
Current page:
reddit.com/r/IAmA/top
Link:
../pics/new
Result:
reddit.com/r/pics/new
Slide 14
Slide 14 text
Current page:
reddit.com/r/IAmA/top
Link:
/
Result:
reddit.com/
Slide 15
Slide 15 text
http://www.google.com
/search?q=flowers#foot
query string
after the question mark “?”
key=value pairs
used to pass information to the web server
Slide 16
Slide 16 text
http://www.google.com
/search?q=flowers#foot
fragment identifier
after the hash sign
points to specific content in the page
Slide 17
Slide 17 text
HTTP
hyper-text transfer protocol
Purpose: Transfer content from a web
server to a web browser
Slide 18
Slide 18 text
Demo
https://gist.github.com/cbas/5378704
Syntax
request/response
method, URI, version
headers
body
Slide 19
Slide 19 text
hyper-text markup language
Purpose: Structures content of the
document semantically
User agent: Browsers, crawlers, screen
scrapers, file converters
HTML
Slide 20
Slide 20 text
Demo
https://gist.github.com/cbas/5379047
Syntax
doctype
elements
attributes
text
comments
Slide 21
Slide 21 text
doctype
describes HTML version the document uses
HTML5 simplified it to “”
Slide 22
Slide 22 text
elements
opening and closing tags:
some text
self closing tags: equals
Slide 23
Slide 23 text
must wrap values in double or single quotes
if they contains spaces,
so just always do it
attributes
Slide 24
Slide 24 text
attributes
white space separated
Slide 25
Slide 25 text
attributes
names case insensitive,
but lowercase looks better
equals
Slide 26
Slide 26 text
text
escape special characters
< “<” or > “>” & or “&”
white space collapses into single space
“Hi there!” becomes “Hi there!”
Slide 27
Slide 27 text
comments
begin with “”
useful to hide a section, or describe it to
other developers (ie. future self)
contains any HTML except comments
Slide 28
Slide 28 text
CSS
cascading style sheets
Purpose: Presentation of the data, typically
through visual layout and design
Targets: Screen, print, or assistive
technology (eg. screen readers)