CS 330 Class 2: Programming Plan for Today - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

CS 330 Class 2: Programming Plan for Today

Description:

body bgcolor='#ffffff' text='#000000' (white with black font for the whole doc. ... What tags can have attribute bgcolor? P. 75-85 has more on colors and tags ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 13
Provided by: cshil
Category:

less

Transcript and Presenter's Notes

Title: CS 330 Class 2: Programming Plan for Today


1
CS 330 Class 2 Programming Plan for Today
  • Recap from last time
  • More UNIX
  • Begin HTML (material from Chapters 5-8)
  • Tags and attributes
  • Hyperlinks
  • Features we will not cover images (Ch. 9),
    tables (Ch 10), frames (Ch 11) but that are
    useful.

2
Recap
  • Server software on aurora (UNIX-based)
  • Access via
  • FTP (file transfer) and
  • Telnet (remote login)
  • Your HTML files/pages created on PC
  • Your HTML files uploaded via FTP to
  • /home/xxx/public-html/
  • Your default page is
  • /home/xxx/public-html/index.htm

3
Recap (cont.)
  • Accessed via
  • a link on the cs330 page or
  • http//aurora.wells.edu/xxx
  • Page maintenance (for now)
  • download HTML file to PC via FTP or from Netscape
  • make changes in WordPad or NotePad
  • upload to aurora via FTP
  • Alternate upload in telnet
  • In Notepad Edit/select all, Edit/copy
  • in Telnet catgtindex.htm, Edit/copy, Ctrl/C

4
UNIX File Permissions
  • Access modes read (r), write (w), and execute
    (x)
  • They are controlled for
  • user (the owner), group (a designated set of
    users) and others
  • You own your directory and any files you create
  • Look at /home/cs330 using long listing (ls -l)
  • First char d directory - ordinary file
  • Next 3 groups of 3 r, w, x permissions for
    user, group and others
  • Number of links to a file
  • The user who owns the file
  • The group that owns the file
  • File size
  • Last modified
  • Name / means directory, means executable

5
Setting versus Augmenting Permissions
  • Setting (p.60) sets all permissions using octal
  • Each group of 3 is one octal number
  • - - - - - - - - - 000 000 000 000
  • rwxrw- r - - 111 110 100 764
  • rwxrwxrwx 111 111 111 777
  • To set to rwxrw- r - -
  • chmod 764 index.htm
  • Augmenting change existing permissions by
    specifying what is to be added or subtracted.

6
Augmenting File Permissions
  • chmod (permissions to change) (the file)
  • uuser, ggroup, oother, a all
  • chmod ar .
  • makes all files on the directory readable
  • chmod g-w index.htm
  • prevents the group from changing index.htm
  • Implications for web pages
  • your public_html must have execute permission to
    be visible
  • defaults on aurora are set so that public_html
    will have this
  • if not chmod ax (the file or directory)
  • if you create a subdirectory, you may need to
    check the permission

7
Language Categories
  • Markup languages control the appearance of a
    static document
  • LaTeX (word processing)
  • HTML. Original goal to support hypertext access
    to other documents (non-linear access)
  • Scripting languages add executable content
  • Client-side (JavaScript, VBScript)
  • Server-side (Perl, ASP)
  • Stand-alone languages (Pascal, C, Java)

8
HTML Tags
  • Format lttaggt processed text lt/taggt
  • lthtmlgt and lt/htmlgt enclose entire document.
  • ltheadgt and lt/headgt enclose header information
  • ltbodygt and lt/bodygt the body of the page
  • lttitlegt and lt/titlegt in head and/or body
  • lt!-- This is a comment. --gt comment
  • ltpgt a new paragraph
  • ltbrgt a line break (new text line)
  • lth1gt and lt/h1gt heading (also ltH2gt to ltH6)
  • ltugt and lt/ugt underline
  • ltbgt and lt/bgt bold
  • ltigt and lt/igt italics
  • ltpregt and lt/pregt preformatted text
  • ltulgt and lt/ulgt ltolgt lt/olgt list
  • Example tags.htm.

9
HTML Attributes
  • Background and text colors
  • ltbody bgcolorffffff text000000gt
  • (white with black font for the
    whole doc.)
  • lt body bgcolor ffffff text
    000000gt
  • (white with black font for the
    whole doc.)
  • ltfont colorffff00gtYellowlt/fontgt
  • (Yellow for the text within the
    tags)
  • Example attrib.htm
  • See p. 470 for documentation of body tags
  • What tags can have attribute bgcolor?
  • P. 75-85 has more on colors and tags to which
    they apply
  • Many of these are deprecated (to be phased out)
    and will be handled in a new feature called
    cascading style sheets (CSS). For now, they are
    widely used.

10
ltmetagt Tags (p.98)
  • Used to include information about a document.
  • Two optional attributes http-equiv and name
  • http-equiv affect how browser handles the
    document. This information actually gets put into
    the HTTP header.
  • name meta information about the document
  • ltmeta http-equiv refresh content 30gt
  • lt meta name keywords content kayaks,
    whitewater, rentalgt
  • See source for CS 330 page.

11
Hyperlinks
  • Hyperlinks connect parts of documents via an
    anchor tag lta href location linked togt
    highlighted text lt/Agt
  • Links can be to the
  • same document (internal anchors)
  • same site (usually via relative URLs)
  • different site (via absolute URLs)
  • or via other protocols (mail, ftp)
  • Internal anchors (also called linking within a
    document)
  • A reference to an internal anchor
  • lta hrefanchor namegt some highlighted
    text lt/agt
  • The anchor lt a href anchor namegtmore
    highlighted textlt/agt

12
  • Relative URLS
  • A link to a file on the same directory)
  • lt a href ex1.doc"gtExerciselt/agt //CS 330 page,
    class 1
  • A link to different directory on the same site
  • lt a href examples/first.htmgtFirst pagelt/agt
    //CS 330 page, class 2
  • Alternate form for CS 330 participant pages
  • lt a href ../xxxgtxxxs namelt/agt
  • Absolute URLS
  • A link, possibly to a different site, with the
    full address
  • lt a href aurora.wells.edu/
    ccs/cs131_01/cs131.htmlt/agt
  • Other protocols, e.g. return address tags, images
  • lt a href mailtocshilepsky_at_wells.edugtcshile
    psky_at_wells.edult/agt
  • lt a href "baby/dragon_7_4.jpg"gt
  • ltimg height 50 width50 src"baby/dragon_7_4
    .jpg"gtlt/agt
Write a Comment
User Comments (0)
About PowerShow.com