Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

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: cat>index.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) u=user, g=group, o=other, a = all chmod a+r *.* 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 a+x (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: processed text { } and enclose entire document. and enclose header information and the body of the page and in head and/or body comment a new paragraph a line break (new text line) and heading (also to <H6) and underline and bold and italics and preformatted text and : list Example: tags.htm.

9 HTML Attributes Background and text colors: (white with black font for the whole doc.) (white with black font for the whole doc.) Yellow (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 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 See source for CS 330 page.

11 Hyperlinks Hyperlinks connect parts of documents via an anchor tag: highlighted text 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: some highlighted text The anchor: more highlighted text

12 Relative URLS A link to a file on the same directory) Exercise //CS 330 page, class 1 A link to different directory: on the same site: First page //CS 330 page, class 2 Alternate form for CS 330 participant pages: xxx’s name Absolute URLS A link, possibly to a different site, with the full address Other protocols, e.g. return address tags, images cshilepsky@wells.edu


Download ppt "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."

Similar presentations


Ads by Google