More XHTML (Links & Tables) : INFO/COM S 130: Introductory Web Design and Programming
More XHTML (Links & Tables) : INFO/COM S 130: Introductory Web Design and Programming
Misc announcements
Sections The right section Attendance Project Groups Web Site and CMS issues Email subject line
Review
On the web, content is separate from presentation XHTML annotates content so computers can present it
By embedding tags
Advanced XHTML
Hyperlinks
Hyperlinks
<a href=URL>anchor text</a> <a href=http://cs130.cs.cornell.edu> CS/ INFO 130 Server</a>
CS/INFO 130 Server
Absolute URLs
Give the entire web address: used to link to outside resources <a href="http://www.mozilla.org/">Use Firefox!</a> <a href="http://www.google.com"> Google</a>
Relative URLs
Used to link within a site <a href="index.html">Home</a> <a href=People/fred.html">Fred's subpage</a> In Fred's page: <a href="../index.html">Home</a> Why not use http:// www.myco.com/People/ fred.html?
Images
Adding images
<img src="cornell_logo.gif" width="100" height="200" alt="Cornell" />
1. Use small images 2. Link to larger images (e.g. via thumbnails) 3. Specify width and height 4. Reuse images 5. Use alt
Combinations
What does the following do? <a href=http://www.cornell.edu> <img src=cornell_logo.gif width=100 height=200 alt=Cornell /> </a>
Tables
Tables
Let you structure information on a page Useful for table data Useful for laying out forms
Simple tables
<table> <tr> <td>..</td> <td>..</td> </tr> <tr> <td>..</td> <td>..</td> </tr> .. </table> Let's try it
Example
<table> <tr> <td>Admissions</td> <td>Academics</td> </tr> <tr> <td>Research</td> <td>Outreach</td> </tr> </table>
Borders
To make the border appear: <table border="1">
Headings
<table border="1"> <caption> Hockey standings </ caption> <thead> <tr> <th>Team</th> <th>Wins</th> <th>Losses</th> </tr> </thead> <tr> <td>Cornell</td> <td>8</td> <td>0</td> </tr> <tr> <td>Harvard</td> <td>0</td> <td>8</td> </tr> </table>
Lists
<p> There are two types of lists: <ol> <li> Unordered lists </li> <li> Ordered lists </li> </ol> </p>
Review
HTML structures: links, images, lists, tables Site organization 5 Commandments of images Wednesday: Information architecture and navigation design