Except where otherwise noted, the contents of this document are Copyright 2012 Marty Stepp, Jessica Miller, and Victoria Kirst. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the author's expressed written permission.
Otherwise note: Claude Anderson was given permission to modify the slides for CSSE 290 at Rose-Hulman by author Jessica Miller. The authors' original slides, based on Web Programming Step by Step, can be seen at http://webstepbook.com.
Some of the examples in some days' slides are from David Fisher at Rose-Hulman, who was kind enough to allow me to use them. My intention is to mark these examples with [DSF].
We should have one of these every day, sometime near the middle of the class period
ipconfig
(Windows) or ifconfig
(Mac/Linux)www.rose-hulman.edu
→ 137.112.18.43
C:\Windows\system32\drivers\etc\hosts
/private/etc/hosts
/etc/hosts
http://www.aw-bc.com/info/regesstepp/index.html ~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ protocol host path
www.aw-bc.com
GET /info/regesstepp/index.html
GET filename
: downloadPOST filename
: send a web form responsePUT filename
: uploadabacus 12:50am > telnet www.rose-hulman.edu 80 Trying 137.112.18.43... Connected to www.rose-hulman.edu (137.112.18.43). Escape character is '^]'. GET /class/csse/csse290-WebProgramming/201330/simple.html <!DOCTYPE html> <html> <head> <title>What a Wonderful World</title> </head> <body> <h1>My first web page</h1> <p>A friend told me once that he thought the www in URLs stood for what a wonderful world (I think it does!).</p> </body> </html>Connection closed by foreign host. abacus 12:51am >
Number | Meaning |
---|---|
200 | OK |
301-303 | page has moved (permanently or temporarily) |
403 | you are forbidden to access this page |
404 | page not found |
500 | internal server error |
complete list |
Today I'll mainly show you a few HTML basics.
Next time you'll spend most of the in-class time writing HTML.
<
element>
content </
element>
<p>This is a paragraph</p>
<!DOCTYPE html> <html> <head> information about the page </head> <body> page contents </body> </html>
.html
DOCTYPE
tag tells browser to interpret our page's code as HTML5, the latest/greatest version of the language<title>
describes the title of the web page
<title>Chapter 2: HTML Basics</title>
head
of the page<p>
paragraphs of text (block)
<p> Notice that the layout of the input text makes little diffference in a paragraph. The browser collapses multiple spaces and treats line breaks as spaces.</p>
body
of the page<h1>
,
<h2>
, ...,
<h6>
headings to separate major areas of the page (block)
<h1>University of Whoville</h1> <h2>Department of Computer Science</h2> <h3>Sponsored by Micro$oft</h3>