Start learning with our library of video tutorials taught by experts. Get started

Up and Running with HTML

Lab: Building tables


From:

Up and Running with HTML

with James Williamson

Video: Lab: Building tables

We'll close out our chapter on tables by creating a table that will act as a quick reference for comment named character entities. And of course this is going to be within our Up and Running with HTML Reference site. Let's take a quick look at the steps for our lab. To do that I'm going to open up reference.htm, which is going to be your lab file, here in the 05_07 folder. I've got, at the very top of the page, all these comments with their steps in it. So let's go through the steps just one by one. The first step is find the data for the table at the bottom of the page.
Expand all | Collapse all
  1. 2m 12s
    1. Welcome
      55s
    2. Using the exercise files
      1m 17s
  2. 29m 30s
    1. Learning HTML
      2m 47s
    2. Choosing a code editor
      5m 2s
    3. Exploring basic HTML syntax
      8m 18s
    4. Do I need to learn HTML5?
      5m 6s
    5. Exploring HTML references
      8m 17s
  3. 35m 40s
    1. Exploring an HTML document
      5m 19s
    2. Working with doctype declarations
      4m 3s
    3. Examining the document head
      8m 20s
    4. Looking at the document body
      3m 21s
    5. Adding document structure
      8m 52s
    6. Lab: Coding a basic page
      3m 9s
    7. Solution: Coding a basic page
      2m 36s
  4. 1h 23m
    1. How does HTML format text?
      5m 51s
    2. Adding headings
      7m 24s
    3. Formatting paragraphs
      4m 54s
    4. Controlling line breaks
      3m 50s
    5. Creating lists
      10m 37s
    6. Emphasizing text
      6m 42s
    7. Displaying special characters
      5m 8s
    8. Controlling whitespace
      4m 35s
    9. Inserting images
      9m 20s
    10. Lab: Controlling page content
      13m 57s
    11. Solution: Controlling page content
      10m 55s
  5. 31m 54s
    1. Linking to pages within your site
      6m 45s
    2. Linking to external pages
      3m 2s
    3. Linking to downloadable resources
      2m 25s
    4. Linking to page regions
      8m 0s
    5. Lab: Creating Links
      5m 57s
    6. Solution: Creating Links
      5m 45s
  6. 40m 27s
    1. Examining basic table structure
      5m 10s
    2. Adding content to tables
      6m 20s
    3. Setting table attributes
      7m 42s
    4. Adding table captions
      4m 3s
    5. Defining table headers
      2m 13s
    6. Making table data accessible
      5m 46s
    7. Lab: Building tables
      4m 13s
    8. Solution: Building tables
      5m 0s
  7. 43m 23s
    1. Understanding the relationship between HTML and CSS
      4m 58s
    2. Creating inline styles
      4m 53s
    3. Exploring the style element
      5m 13s
    4. Basic font styling
      9m 24s
    5. Changing color
      4m 55s
    6. Taking styles further
      5m 24s
    7. Lab: Controlling basic styles
      5m 10s
    8. Solution: Controlling basic styles
      3m 26s
  8. 5m 44s
    1. Next steps
      2m 56s
    2. Additional resources
      2m 48s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Up and Running with HTML
4h 32m Beginner Oct 19, 2012

Viewers: in countries Watching now:

This course is designed to quickly lead you through the steps of building an HTML website, from creating a new page to building links and tables. Author James Williamson simplifies the coding process, with straightforward steps you can recreate on your own. The course explains the basic structure of an HTML document, shows how to add text and images, and introduces font styling with CSS. James also offers a bonus design challenge at the end of each chapter, where he asks you to think of a solution before offering his own.

Topics include:
  • Choosing a code editor
  • Coding a basic page
  • Adding headings
  • Formatting paragraphs
  • Creating lists
  • Inserting images
  • Linking to internal and external pages
  • Linking to downloadable content
  • Building tables with headers and captions
  • Creating inline CSS styles
  • Changing the color and font of your text
Subjects:
Web Web Design Web Development
Software:
HTML
Author:
James Williamson

Lab: Building tables

We'll close out our chapter on tables by creating a table that will act as a quick reference for comment named character entities. And of course this is going to be within our Up and Running with HTML Reference site. Let's take a quick look at the steps for our lab. To do that I'm going to open up reference.htm, which is going to be your lab file, here in the 05_07 folder. I've got, at the very top of the page, all these comments with their steps in it. So let's go through the steps just one by one. The first step is find the data for the table at the bottom of the page.

It's located in an HTML comment below the closing HTML tag. You're going to use this data to create a simple table with 3 columns and 18 rows. I'm going to scroll down and show you that data. When you scroll down you're probably going to look at your screen and you're going to look at my screen and you're going to say "wait a minute; this doesn't look the same." It's the same data, but depending upon which code editor you're using, you're not going to see this nice little three-column thing I have set up here.

They could be all over the place. You got the word wrapping going on. So I don't want you to freak out if you don't have a neat and tidy little columns like I do here. Feel free to just pause the video and take a look at this and then clean yours up a little bit. You may have to delete some spaces, you may have to reformat them, or you can just leave them the way they are, because essentially what's going on here is the first one will be the first table cell, then the second one will be the second table cell, third one will be the third table cell, and then you get a new row. The data is going to be all there; it just may not be formatted this way. Because this is just sort of a raw text file and because this is an HTML comment, there's really no way for me to guarantee that the spacing is going to be the same.

Now let me get back up to our other steps here. The next step is examine the data determine which cells should be table header cells. So that means look at the data and kind of figure out where your headers are going to be: Are they're going to be the top of the table or are they going to be on the side of the table? Which of these cells should be table header cells? The third thing you want to do is go ahead and set the cellpadding and the cellspacing for the table to 0. Go ahead and set the border to 1. The next thing you want to do with your table is you want to make the table a little bit more accessible.

You want to set the scope of the table headers, and remember the scope is going to be either row or column based upon where you've put the headers. And you want to give the table a summary. I'm not going to give you the text for the summary. This is the part of the lab exercise is you have to look at the table and kind of figure out, "how would I summarize this?" Just remember that the summary should reflect the purpose and the content of the table, and it could be little longer than the caption. Now, speaking of the caption, you do need to create a caption for the table. One of the things that I want you to consider is whether any existing page content can be incorporated into the table as a caption. Hint, hint: so if you scroll down on the page, you'll find where the table goes.

Now, again, if you're wondering, why does your code looks so much taller then mine? I've collapsed several of these sections so that I don't have to scroll through all this. It's just one of the benefits of using this particular code editor: I can collapse those sections. So about line 82, I've got little table goes here. And gee, is there anything right around where the table goes that might identify what is in that table? Maybe something to make a good caption. Step number 6. In the first table cell of each row give the table cell a class attribute. We haven't talked a lot about classes, but if you set an ID attribute you can set a class attribute. It's class, equals, and then whatever value you want to pass in. The value we want to give it is center, so class attribute of center for each one of these first table cells in each row.

For the most part, you're probably going to find building this table pretty straightforward. But you know, I'll honest with you: this is certainly more like what you're actually going face in the real world as you start building your tables. And it introduces a very real danger with tables: it's so easy to make a mistake when dealing with such repetitive code. It's table row after table row, after table cell, after table cell, so take care as you construct a table to make sure there aren't any errors in the table's syntax.

There are currently no FAQs about Up and Running with HTML.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Up and Running with HTML.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked