New Feature: Playlist Center! Pick a topic and let our playlists guide the way—like a learning mixtape.

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

XHTML and HTML Essential Training
Illustration by

Creating a page with a menu, graphics, and formatted links


From:

XHTML and HTML Essential Training

with Bill Weinman

Video: Creating a page with a menu, graphics, and formatted links

Moving right along in building the website, we're doing the gear page now which is the second page in our website and this is what it looks like. So we have a different ID image here. We have this little menu for the different subcategories of gear for sale. We have this paragraph of text and then we have This month's special here, and the content on the right. So, let's get started.
Expand all | Collapse all
  1. 5m 10s
    1. Welcome
      1m 16s
    2. Using the exercise files
      1m 23s
    3. Choosing a text editor
      2m 31s
  2. 15m 46s
    1. Introducing HTML and XHTML
      2m 53s
    2. Understanding versions of HTML and XHTML
      2m 25s
    3. Exploring a simple XHTML page
      4m 47s
    4. Understanding the structure of an XHTML document
      2m 58s
    5. Understanding document containers
      54s
    6. Creating and using templates
      1m 49s
  3. 42m 4s
    1. Understanding how empty space is formatted in XHTML
      2m 42s
    2. Using paragraph tags
      2m 42s
    3. Aligning paragraphs
      2m 49s
    4. Understanding block-level and inline tags
      1m 24s
    5. Controlling line breaks and spaces
      5m 43s
    6. Formatting text with phrase element tags
      3m 28s
    7. Formatting text with font markup elements
      3m 24s
    8. Adding document structure with headings
      3m 25s
    9. Formatting quotations and quote marks
      2m 19s
    10. Preserving pre-formatted text
      1m 30s
    11. Selecting a typeface
      4m 33s
    12. Selecting a type size
      2m 11s
    13. Using ordered and unordered lists
      5m 54s
  4. 7m 48s
    1. Using inline images
      3m 17s
    2. Flowing text around an image
      2m 4s
    3. Breaking lines around an image
      2m 27s
  5. 22m 34s
    1. Working with hyperlinks
      7m 46s
    2. Using relative URLs
      3m 5s
    3. Specifying a base URL
      2m 4s
    4. Linking within a page using fragments
      4m 28s
    5. Creating image links
      5m 11s
  6. 22m 56s
    1. Introducing tables
      4m 37s
    2. Formatting tables with CSS
      8m 50s
    3. Aligning images with tables
      5m 7s
    4. Reviewing an alternative solution using CSS
      4m 22s
  7. 14m 31s
    1. Introducing frames
      7m 56s
    2. Hiding frame borders
      3m 15s
    3. Creating inline frames using iFrame
      3m 20s
  8. 20m 50s
    1. Introducing forms: part 1
      10m 37s
    2. Introducing forms: part 2
      7m 45s
    3. Using CGI with forms
      2m 28s
  9. 25m 42s
    1. Introducing CSS
      3m 11s
    2. Understanding levels of inheritance
      6m 10s
    3. Learning CSS syntax
      11m 23s
    4. Using units of measure in CSS
      4m 58s
  10. 1h 45m
    1. Comparing table layout and CSS layout
      1m 25s
    2. Exploring the finished web site
      2m 37s
    3. Building a document header
      8m 18s
    4. Placing a banner and a contact button
      8m 13s
    5. Laying out a main menu
      6m 55s
    6. Creating a layout template: main body area
      13m 31s
    7. Creating a layout template: sidebar area
      5m 17s
    8. Creating a layout template: footer content
      4m 46s
    9. Building a main home page: main body content
      11m 24s
    10. Building a main home page: sidebar content
      8m 52s
    11. Creating a page with a menu, graphics, and formatted links
      13m 26s
    12. Creating a page containing an ordered list
      6m 44s
    13. Creating a page containing video
      10m 45s
    14. Touring the finished site
      3m 45s
  11. 53s
    1. Goodbye
      53s

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 ...
XHTML and HTML Essential Training
4h 44m Beginner Jul 28, 2009

Viewers: in countries Watching now:

In XHTML and HTML Essential Training, Bill Weinman helps designers and coders understand XHTML and HTML. In the process, Bill covers document structure, block and inline-level tags, floating images, controlling white space, phrase and font markup, and tables and frames. He even provides a good introduction to CSS. Bill offers step-by-step guidance for building a complete working web site. Exercise files accompany the course.

Topics include:
  • Understanding the structure of an HTML or XHTML document
  • Creating and using templates
  • Controlling white space and line breaks
  • Making effective use of tables and frames
  • Flowing text around an image
  • Formatting tables with CSS
  • Creating web pages that work properly across platforms and devices
  • Reviewing a case study of a complete web site
Subjects:
Developer Web Web Design Web Foundations Programming Languages Web Development
Software:
HTML XHTML
Author:
Bill Weinman

Creating a page with a menu, graphics, and formatted links

Moving right along in building the website, we're doing the gear page now which is the second page in our website and this is what it looks like. So we have a different ID image here. We have this little menu for the different subcategories of gear for sale. We have this paragraph of text and then we have This month's special here, and the content on the right. So, let's get started.

Here in our text editor, we have the empty template. We have the beginning.css, which is where we left off in our last lesson with the CSS, and we have the text that we're going to copy and paste. This is already all XHTML-ified for us. So here we go. First thing we're going to do is we're going to Save As, which is what we always do, and in this case, it's going to be gear.html.

That's the name of the page and then the CSS would be main.css and the gear text we're going to leave alone because we're only reading from that. We're not writing to it. So the first thing we do is we change the page title here and it will be Groundswell Gear. Then we're going to change this menu section here, here only save this, and we'll show you in the browser what we're doing.

Here the Gear menu item is the current image, so it's taller, and it's gray and it's not a link, whereas in the previous page, it was the Home menu item. So here it's the Gear menu item and so we'll need to change that and this is the easy way to do that. I'm just going to grab this here and I'm going to cut with Ctrl+X, that would be Command+X on a Mac, and just move it down one, right to here, so it's between the end of the previous link and the beginning of the next link and press Ctrl+V to paste.

Then I'll change this first one to home, and home here, and home here, and then swap the widths, this will be 80, and this one will be-- was it 73? Yes, 80 there and 73 here and then this home-current becomes gear-current, and this home becomes gear.

So that's how easy that is. I just swap these pieces around and renamed them. So I'll save. We can look at our progress in the browser, gear.html, and drop it in there. There we have the Gear menu. That looks like it works just fine. So if I click on Home, we get the page we did last, but when I click on gear, we get where we are here so far. Now, I want to change this middle image to be the gear ID image.

The Alt text, we'll say check out our gear. Then save that. Now we have our gear banner, hit reload in the browser and there is our gear banner. Now it's time to do the content. First, we'll cut and paste the content from in here and so this is the main part. Just right there, press Ctrl+C to copy, and Ctrl+V to paste.

That's all of that. Let's go ahead and indent it with the rest our content. Go ahead and save and take a look at this. I know it's going to need some CSS work, but that's not bad. So, what are some of the things we need to do here? Well, first of all, we need to format this so that it looks more like that, instead of these default links. So let's start there. All right, so we have a class here for the leftMenu and that will be used for our formatting in the CSS.

So we'll go into the CSS, we'll come down here to the bottom of the mainContent, and we'll go ahead and do a class selector. mainContent is the ID, and then it is p.leftMenu. All right, so first of all, we want this Trebuchet font so we'll go ahead and copy that from some place else. And it's got a margin bottom 1.5ex, and that will give it that space underneath it.

So I'll go ahead and I'll save and we can look in the browser here. So that's that nice space underneath that helps it to look like a menu. Now we need to change these links so they look more like this. See, they don't have the dashes underneath them and they start out with the gray and the highlight as you hover the mouse over them. So I'm going to change that. So that works like this here. Now, we have a three- stage selector to work with.

mainContent, that's the ID selector, p.leftMenu, that's the class selector, and then within that we have the a, for the anchor. So if we look in the XHTML here so that we have mainContent ID selector and then within that the leftMenu class selector, and then within that the tags. So all these tags will be selected by this selector here, this three-stage selector. So what we want do is change the default color to this color here, and then in the hover, we want to take off that border.

So I'm just going to copy this so I have that selector and then edit the hover. Then it will have a different color now. It will be the #b36b00. Again, these colors were all selected for me by the designer. Then border: none and so there we have it. So now when the mouse is hovered over, save, the border won't be there. It'll just change colors.

So let's look at it in the browser here and reload. So now we start with that dingy color, and we get the highlight as we move the mouse over. All right, so that's exactly what it looks like over here. Excellent! Now, we want to format this part here, because that part is not looking how-- so it needs to have all this nice space around and it needs this formatting here, the header, and the body, and then the dollar amount, in this paragraph down there.

So there's quite a bit of formatting to do. So let's get to it now. For this part, we want to just do a separate section. We'll go ahead and put in a comment here, which is the gear description section. The right number of equal signs there. There's a table there I'm going to use to select by. And here it is and it has a td, which is the table cell with an ID gearLeftImage.

So that's just for this image here, and that image is going to float and also has this class, leftFloatImage. In this case, we're really just going to use the td gearLeftImage here and do the formatting from there. All right, so td#gearLeftImage and we are just going to give it padding of 25 pixels all around and I'll go ahead and save.

Then going back over here in the XHTML, we see that the next part is this other table cell that's called gear description. So I'll go ahead and enter a selector for that and that's going to get a width, 290 pixels, save. Let's just take a look at what this looks like in the browser so far. Well, it's starting to get there.

We see that the image looks nicely positioned there and the paragraph looks nicely set up. Now we just need to enter the formatting for this. So we have an h3 for the heading and that's going to get some interesting formatting. It's going to be the Georgia font, font-size will be 1.2em, color is the c47500 color.

It's got a bottom border there and it's got padding at the bottom, just 0.2em. So it's going to be a little close. Then the margin-left, so that its flush is zero. So let's go take a look at that heading now. That heading should now be really pretty. There it is.

So you see in the reference here, it's just like that, and in there, it's just like that. Now let's format the rest of these pieces. Right, so we have this paragraph here, which is going to be in the Trebuchet font, you'll notice in the browser. That's the Trebuchet font. The rest of this is all the Trebuchet font. So we can create a selector just for all the p's in this section and copy and paste that Trebuchet font from up here, and there it is.

The font-size is 0.8em. Save that and get in the browser, we have the Trebuchet font for all the paragraphs. Now, the price paragraph. That has a price selector on it. Go ahead and look in the HTML, you'll see that there's a class=price, so that's a class selector.

We do here is we want to right align it and give it some font size. Make it a little bit larger. So go ahead and save there and look in the browser. There we have the price, all large and to the right. So that makes this whole thing look just like this. See that link in here? It's the style from the rest of the document, and that's just fine.

So that's the left side. Now the right side should be pretty easy. Go ahead and get the text for the right side. I think all this formatting is already ready. I'm just going to copy and come in here. Select these lines and paste. I'll go ahead and select those lines, and indent, and save. You'll not see anything unique in here so that just work just fine and there we have it.

We have product images and they're already all nicely indented everything because of the styles we've applied before. So you can see how this kind of stuff just becomes real easy once you've done it once. This is the power of the style sheets, with all those styles setup for that column. So these elements that are in that column, they just get styled right away, and it all just looks just right. There is our Gear page and it looks exactly like the reference, and the link works, get Home and back to Gear, and there we have it.

On to the next page!

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.

join now 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 XHTML and HTML Essential Training.

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
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.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.