Web Design Table Assignment

, etc.) text on each page.
-The pages should link to each other with “relative” URLs.
-Each page should also include at least one “absolute” URL linking to an external website.
-You should include at least one image (JPG, PNG, or GIF) on each page. (We’ve not covered image editing yet but feel free to use images from your digital camera or smartphone as well as images downloaded from the Web.)
-All img elements should include src, width, height, and alt attributes with appropriate values.
-You should also include an HTML table somewhere on one of your pages.
-Pay close attention to your HTML tags and be sure to test your pages locally using Firefox, Safari, or Chrome.

Publishing Your Site
Upload your “me” directory, including the HTML and the image files, to the i6 Unix server with an FTP client such as Fetch (from ITS) or WinSCP. Your files should go in the same, “public_html” directory that your assignments page is in. Test your pages again using Firefox, Safari, or Chrome once they are “live” on the Web server to make sure they are accessible.

Finally, create a link from the “HTML” line of your assignments directory to the home page of your new website.

Submitting Your Assignment
Submit the following via NYU Classes. More information on submitting files with NYU Classes is available here.

The URL to your pages in the general form of http://i6.cims.nyu.edu/~netid/
A compressed file containing all the files of your new website
Please note that you are required to submit files along with URLs in order to receive credit for your work.

Grading
This assignment is worth 10 points.

A new website of at least three pages about the student. (3 points)
Website should be in its own subdirectory called “me” and the home page should be an “index.html” file. (1 point)
Each page should contain both paragraph and heading text. (1 point)
Pages should link to each other with relative URLs. (1 point)
Each page should also include an absolute URL linking to an external website. (1 point)
Each page should include at least one image in JPG, PNG, or GIF format. (1 point)
All image elements should include src, width, height, and alt attributes with appropriate values. (0.5 point)
At least one of the pages should include an HTML table (1 point)
The assignments directory page from Assignment 1 should include a relative URL linking to the home page of this assignment. (0.5 point)
Points may be deducted for improperly formed HTML elements.

Thomas Michaud walks you step by step through how to create a table in HTML, in this chapter from Foundations of Web Design: Introduction to HTML & CSS.

This chapter is from the book 

What are HTML tables used for? Think of spreadsheets or data you want to organize and present. Maybe you have statistics, a schedule, or a project you need to organize. Let’s see how each element is used.

Table Element

The element allows you to arrange and present data in rows and columns of cells. However, it can’t do much without its supporting cast: the (table row), (table data cell), and (table header) elements. So, let’s start out by using these basic elements with some common attributes.

Step 4.1.1

Open the table.html document in the fowd_ch04_folder and enter a table element inside the element.

Table Headings

The element holds the heading of each column. Let’s say you’re developing a reading list of your favorite books and you want columns for the authors, for the book titles, and for indicating if you’ve read each book.

Step 4.1.2

Add the three elements with the column topics within the tags.

Author(s)Book TitleRead?

Save your document and view the result in the browser (Figure 4.1).

Table Rows

The element defines the rows of your table. While the three elements already display as a “row,” the element gives structure and meaning to a row—and a table can have lots of rows.

Author(s)Book TitleRead?

The next row will add data about one of your favorite books. The data for each book will be contained in a row, between a set of tags. The first book is John Steinbeck’s The Grapes of Wrath, which you will affirm you’ve read.

Author(s)Book TitleRead? John Steinbeck The Grapes of Wrath Yes

When you view this site, notice that the data is above (not below) each heading and not within the borders of your table (Figure 4.2).

In order to get the data in the correct spot, you need to add another set of tags around each piece of data using the element.

Table Data Cell

The element defines the cells of your table and contains your data.

Step 4.1.3

In the example, the book’s name, the author’s name, and your “yes” or “no” (whether or not you’ve read the book) are your data. Each item of data needs to be within a element.

John SteinbeckThe Grapes of WrathYes

Now each cell of data is below the header it matches (Figure 4.3).

Table Border

In order to see your table a little more easily, you’re going to add a border around it. Although we’ve not discussed CSS (Cascading Style Sheets), this method is best for displaying borders.

Step 4.1.4

Add styles, within the tags located in the element, to show the border for the , , and elements within your HTML document (Figure 4.4).

FIGURE 4.4. Your CSS styles create a border around your table and data cells.

Order Headers and Data

Each has to be ordered according to the . So your first element should relate to the first element, the second element relates to the second element, and so on (Figure 4.5).

FIGURE 4.5. Illustration of an ordered layout for table headers and table data.

Table Caption

The element gives an overall title to the table. In this case, maybe you’d call it “My Reading List”—it’s actually a list of books that I have either read or want to read.

Step 4.1.5

The element for the table comes right after the opening tag. Go ahead and add it to your code.

My Reading List

Notice the text for the caption is placed above the table headers, but outside of the border (Figure 4.6).

FIGURE 4.6. The caption is added to the top of the table, but not within the border.

Table Header

The element helps to group your table header () cells.

Step 4.1.6

In this table, the header row is where the elements are: “Book Title,” “Author(s),” and “Read?” Simply add the opening tag before the opening tag and add the closing tag immediately after the closing tag for that row.

Table Body

The element groups the body—the set of rows where the content resides—of the table.

Step 4.1.7

Place the tags around the book list.

Table Footer

The element groups the summary (footer) area of the table. The summary of a table could show the copyright information for the data, give credit to who has created (or edited) the list, provide totals of column values, or indicate when the table was last updated.

Step 4.1.8

After the closing of the tag, add the tags. Within the element, add a element and element with the data Updated March 5, 2013.

Now you’ll view your document with the addition of your new elements (Figure 4.7).

FIGURE 4.7. The data in the now displays at the bottom of the table layout.

Spanning Columns

The attribute allows you to expand a data cell to span multiple columns in the table. So, in the example, you have the that consists of one row with three columns of data (Figure 4.8).

And, in the , you currently have one row with three elements (Figure 4.9).

However, the element has one row ( element) and only one element (Figure 4.10).

Step 4.1.9

You can tell that element to span multiple columns by adding the attribute (short for “column span”) and assigning a value (in this case, you want it to expand to three columns wide).

The result gives you a element that spans all three columns (Figure 4.11).

FIGURE 4.11. Your footer now spans all three columns of your table.

Categories: 1

0 Replies to “Web Design Table Assignment”

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *