Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

HTML 4_01 Weekend Crash Course - G. Perry

.pdf
Скачиваний:
34
Добавлен:
24.05.2014
Размер:
6.32 Mб
Скачать

Session 28—Correcting Web Site Problems

387

QUIZ YOURSELF

1.What kinds of information about your site’s visitors can your Web Host provide? (See “Potential Usability Problems and Statistics.”)

2.What is the difference between a hit and a click-through? (See “Potential Usability Problems and Statistics.”)

3.What are some things you do during a usability study on your site? (See “Potential Usability Problems and Statistics.”)

4.What alternative to image maps can you use? (See “Image Map Problems.”)

5.What are two ways to guide your users to an image map’s hot spots? (See “Image Map Problems and Solutions.”)

Session

Sunday—VI Part

28

Afternoon

S E S S I O N

29

Keeping the Family

Web Site Fresh

Session Checklist

Learn how the Barkleys keep their Web site fresh

Document your site with future maintenance in mind

Study the well-documented Barkley home page HTML for documentation tips you can use on your page

Improve the readability of the text on the site

Don’t write long, flowing streams of text but keep your site moving rapidly, breaking up thoughts along the way with headings and hyperlinks

Let your users scan your site for the information they want to read; don’t push too much text onto the user all at once

In this session, you begin to wrap up your HTML learning! You’ll master some pointers about HTML feedback, site documentation, and text flow to help keep your Web site fresh. Here, you learn how the Barkleys keep their family Web site

fresh. In addition, the Barkleys’ fully documented home page is provided so that you can study it and then practice revising the HTML code and documentation.

390

Sunday Afternoon

Freshness Is the Key

This session describes how to keep your site fresh by making your site easy to update. You already know that freshness is the key to return Web users, and this session spends some time wrapping up your HTML knowledge by offering hints on Web site maintenance. What are the best ways to keep your site fresh? You’ll learn some here.

Get quick HTML feedback

HTML code is simple to maintain. When you make an HTML mistake, you instantly see that mistake in your browser and a change that you make shows up immediately. Years ago, programmers had to wait, sometimes 24 hours, before their batch programs would compile, and if they fixed a mistake in the code, another long round was required. One way that you get extremely fast HTML feedback is to create and edit HTML using this routine:

1.Open your HTML text editor.

2.Open your browser.

3.Maximize both in full-screen mode.

4.Enter or edit your HTML code in the editor and save the file to the appropriate directory.

5.Switch to your browser screen and open the HTML file. Most browsers provide a menu option that opens a file, such as File Open. Instead of selecting a Web page, you select the HTML file from your own disk drive. The HTML code appears inside your browser, and you see the results.

6.Without closing the browser, move back to your HTML editor and make some changes.

7.Without closing the editor, move to your browser and click your browser’s Refresh button. Instantly, the browser loads the fresh copy of the file, and you see the results of your change.

8.Keep moving back and forth between your editor and browser, saving the HTML file every time you make changes and then immediately looking at those changes after clicking Refresh on your browser’s menu or toolbar.

If your monitor is large enough, you can keep both the HTML text window and your browser window open at the same time. You can make a change in the HTML code and see the change’s effect as soon as you click your browser’s Refresh button.

Session 29—Keeping the Family Web Site Fresh

391

With the HTML code still on the screen in the other window, you can more easily locate where in the code the HTML still has a problem.

Write the documentation

In spite of the speed and simplicity of HTML described in the previous section, you must add some documentation to your site. Throughout earlier sessions, you saw some of the ways that documentation eases your maintenance burden as well as helps to provide contact information and a change log for all HTML coders on a team who maintain the same site.

As you add comments, you must consider the time you’ll spend changing and adding content to your site later. Just because you create a site does not mean that you will be the one who changes the content. If you’re out of town, someone else on your team or in your family may need to make changes. Another reason for the comments is that you will be adding and changing content and sometimes the HTML code gets confusing without comments.

Consider the Mom’s Corner section of the Barkleys’ Web site. On the page where her contents appear, the Barkleys must use ample documentation that explains which areas of the Web page’s HTML don’t change when the content changes. Of course, a change to the navigation bar or heading may be needed as well, but the day-to-day maintenance of the site more often requires changing only the fixed content and not the structure that surrounds the content.

Throughout the entire Barkley home page, comments explain what each section does. You’ve already seen most of those. But more comments are needed that explain exactly how to change the various elements that appear on the page. Even the logo or the large message, All the news that’s new for you, may need to change, depending on the circumstance and depending on how much the Barkleys want to spruce up their site.

You should spend some time studying the Barkley family home page HTML code in its final form because that page contains the full set of comments. The entire ten-minute section that follows displays the home page’s HTML code in a program listing.

The Barkleys’ Fully Documented Home Page

Listing 29-1 contains the entire Barkley family Web site’s home page with a full round of comments that explain the code. You’ve seen many of the comments before in the code in the earlier sessions. The comments are represented by the <!> tag.

Session

Sunday—VI Part

29

Afternoon

392

Sunday Afternoon

Once you complete your initial site’s development, spend time studying the effective comments in the Barkley code. The comments describe every aspect of the code that the Barkleys might want to change. Then go back and edit the places in the code in Listing 29-1 that are described by the comments.

Listing 29-1

The final Barkley home page’s HTML code with maintenance comments throughout

<html>

 

 

<!------------------------------------

 

>

<!--

The Barkley Family Web site

-->

<!--

To relate news to family and

-->

<!--

friends around the world.

-->

<!--

Created: June 4, 2003

-->

<!--

Last modified: August 15, 2003

-->

<!--

Write wBarkley@ourweb.net if

-->

<!--

you have questions.

-->

<!------------------------------------

 

>

<!----------------------------

>

 

<!--

The header begins here -->

 

<!----------------------------

>

 

<head>

 

<!-- Change the following title whenever

 

the window title bar needs changing --

>

<title>The Barkley Family Web Page</title>

 

<!-- The search engine tags appear next --

>

<meta name=”description”

 

content=”Barkley Family Web Site”>

 

<!-- Add to the keywords below if we have more children or add features to our Web site that we want search engines to pick up. -->

<meta name=”keywords”

content=”Barkley, Barkleys, Scott Barkley, Gail Barkley, Rachel Barkley, Annie Barkley, new home, we’ve moved, Kid’s Playground”>

Session 29—Keeping the Family Web Site Fresh

393

<!-- This table is the header portion of our site --> <table width=100% cellpadding=0 cellspacing=0 border=0

bgcolor=#008000>

<!-- First row only contains a Home link No need to change it unless our Web address changes and we want the Home

link to point to a different address -->

<tr>

<td height=21 width=179 align=left> <font face=Arial size=2>

<a href=”http://www.BarkleyFamilyPage.com/”> <b><i>Home</i></b></font></a>

</td>

<!-- Table needs two more cells defined --> <td width=169 height=21>

</td>

<td width=788 height=21> </td>

</tr>

<tr> <!-- Blank Line as a thin row -->

<td colspan=3 bgcolor=white width=100% height=2 align=left>

</td>

</tr>

<!-- This begins the logo band of the header. No need to change anything here unless we change our logo image file name and/or its size. We’ll also want to change the logo’s link if our Web address ever changes -->

<tr align=left> <!-- Logo -->

<td align=left width=179 height=24>

<!-- The logo links to the home page -->

<a href=”http://www.BarkleyFamilyPage.com/”> <img src=”barkleys.gif” width=149 height=66

align=”absmiddle”

border=0 alt=”Family Home Page”>

Session

Sunday—VI Part

29

Afternoon

Continued

394

Sunday Afternoon

Listing 29-1 Continued

</a>

</td>

<!-- The mailbox image and email link is here. No need to change unless we change the mail image and/or its size. We’ll also want to change the link if our email address ever changes. -->

<td width=169 height=24> <p align=center>

     

<a href=”mailto:Barkleys@email.mn.net”>

<img border=0 src=”mailbox.gif” align=middle width=120 height=77 alt=”Mailbox”>

</a>

</td>

<!-- The following <td> through </td> simply define the large gold text that appears to the right of the email graphic image. If we change the text, we will probably need to change the number of nonbreaking spaces that help center the text inside the cell but still keep the text on the left edge portion of the cell. -->

<td height=24>

<font face=Arial size=6 color=#CC9900>     All the news<br>  that’s new for you</font> </td>

<!-- The remaining code between here and the body defines only colored, separating lines that separate the header area from the body. -->

<tr> <!-- Blank Line as a thin row -->

<td colspan=3 bgcolor=white width=100% height=2 align=left> </td>

</tr>

Session 29—Keeping the Family Web Site Fresh

395

<tr> <!-- Golden Line as a thin row -->

 

<td colspan=3 bgcolor=#CC9900 width=100% height=2

 

align=left>

 

</td>

 

</tr>

 

</table>

 

</head>

 

<!-------------------------->

 

<!-- The body begins here -->

 

<!-------------------------->

 

<!-- The body’s background color should match the header’s

 

and the navigation bar’s color -->

 

<body bgcolor=008000 link=white>

 

<!-- The following code defines the navigation bar that

 

falls down the left side of the Web site. The

 

navigation bar is actually the first of three columns

 

in the table at the bottom of the site. We’ll

 

have to change the navigation bar once in a while.

The navigation bar primarily consists of a link followed by the text that the user will click to go to that link. We’ll usually not change the the primary, top section,

but we’ll be adding and removing the special bulletins from time to time. Also, we may be changing the icon we use for the link to the Kid’s Playground. -->

<!-- *** If we make any changes to this navigation bar, except for the Kid’s Playground, we must replicate this change throughout all pages on our site because we want each page to display a consistent navigation bar. If we tire of copying all code EXCEPT the Kid’s Playground icon, we may begin to put the icon on the other pages also to keep things easier

instead of maintaining two separate versions of the same navigation bar. -->

<table border=0 width=2000 height=3 cellspacing=0 cellpadding=0>

<tr>

<td width=140 height=382 bgcolor=#008000 align=center

Session

Sunday—VI Part

29

Afternoon

Continued

396

Sunday Afternoon

Listing 29-1

Continued

valign=top rowspan=3>

<font face=Arial size=2 color=#FFFFFF> <b><i>Welcome</i>

<hr>

<a href=”http://www.BarkleyFamilyPage.com/Mom.htm/”> Mom’s Corner

</a><br>

<a href=”http://www.BarkleyFamilyPage.com/Dad.htm/”> Dad’s Corner

</a><br>

<p align=center>

<!-- The next <img> tag defines the graphic we use for the Kid’s Playground. Routinely, we should change this graphic to keep the image fresh, but maintain the same pixel size measurements or we’ll throw off the size of the navigation bar -->

<img border=0 src=”Kids.gif” width=49 height=44 align=left>

<a href=”http://www.BarkleyFamilyPage.com/Kids.htm/”> Kid’s Playground

</a><br><br>

<a href=”http://www.BarkleyFamilyPage.com/Pics.htm/”> Family Pictures

</a><br>

<a href=”http://www.BarkleyFamilyPage.com/Movies.htm/”> Favorite Movies

</a><br>

<hr><hr>

<i>Special

<br>Bulletins</i>

<hr>

<a href=”http://www.BarkleyFamilyPage.com/Travels.htm/”> Family Travels</b>

</a>

</font>

</td>