Web Publishing: Graphics, Lists, and Tables

Made with Nvu An open source web page authoring tool.


-------------------------

Graphics

-------------------------

Design Issues Regarding Graphics on Web Pages

There are several things to keep in mind when using graphics on a web page.

File Size

A big file means slow downloading, a small file means fast downloads. Therefore, keep your graphic files as small as possible. Some things that can be done to accomplish this include, ...

  • colors: For GIF files, use as few colors as possible.
  • dimensions: Don't make an image any larger than it needs to be.
    • If a large picture is desired, one option is to use a "thumbnail." This is a small copy of the full sized image that is linked to the full sized image, which the user can view if they desire. For example, the first photo at the right is an example of a thumbnail. Click on it to see the full size image.
    • An alternative to a thumbnail is to use a cropped portion of the entire image and make it a link to the complete image. The second photo at the right uses this approach. Click on it to see the complete image.
  • compression: GIF (lossless) vs. JPG (losey). Use JPG for photographic type images and GIF for all other images (when in doubt, create both and compare the results). Also, when compressing a JPG, try different compression factors to balance quality vs. file size.
Park with Gazebo
Gazebo in Pendleton park.

Graphic File Location

Unlike other applications such as word processing, graphics are NOT embedded in the HTML file that produces a web page. The HTML file only contains a reference to the graphic file. The reference specifies the location of the graphic file (relative to the location of the HTML file) and the name of the file. Therefore, ...

A graphic file MUST first be properly placed in the web site directory structure before a reference to it is placed in a web page.

Also, the web page must first be saved BEFORE a graphic is added to the page. Of course, it also needs to be saved again after graphics are included.

NOTE: If you move the graphic or the HTML file, the reference for the graphic must be changed (unless both are moved together and the relative location remains the same). Also, if the size of the graphic is edited, you will need to delete the reference from the page (i.e. delete the image from the web page) and then place the image again.

Where should a graphic file be placed within the web site folder structure?

Typically in one of four places...

Purpose (aka: Why use a graphic?)

Graphics should enhance the page and have a purpose. Do not place graphics just because you can. A graphic should improve the visual affect of the page and/or provide additional information. The reader of your page should never wonder "what does that image have to do with this information?"

Random graphics with no purpose draw the reader's attention away from the real purpose of the page and wastes bandwidth and people's time.


Placing a Graphic on a Web Page

VERY IMPORTANT: Before placing a graphic on a web page, the graphic MUST...

Also, the web page that will use the graphic must be saved before placing the graphic.

To place a graphic on a web page using Nvu ...

MORE IMPORTANT NOTES:


Alignment of Text Around Graphics

How is the text on a page positioned relative to a graphic? There are primarily two options:

Alignment Example
top text around an inline graphic
center text around an inline graphic
bottom text around an inline graphic
wrap to the left text wrapped to the left
around a graphic
wrap to the right text wrapped to the right
around a graphic

These options are determined in Nvu as follows:

  1. Right-click on the graphic.
  2. Select the last command from the popup menu (Image Properties...). This will take you to the same dialog box that was used to place the graphic.
  3. Click on the Appearance tab at the top of the dialog box.
  4. Use the popup menu at the top right of the dialog box to select an alignment option.
  5. Click the OK button.

Try it! Experiment with each of the five options to see their differences.

Can you wrap partially down the graphic and then continue below the graphic? Yes ...

Try it!

Centering a Graphic on the Page

How do you get a graphic centered on the page? Set the alignment to one of the inline options, place the graphic in its own paragraph (i.e. no text on the paragraph, just the image) and center the paragraph.

NOTE: Text will not be able to flow around its sides ... which is okay, because reading across a graphic is a very poor design option.


Other Options with Graphics

Changing the Location of a Graphic on the Page

A Border Around a Graphic

A border of any thickness can be placed around a graphic. To specify the thickness (in pixels) of a border in Nvu ...

  1. Right-click on the graphic.
  2. Select the last command from the popup menu (Image Properties...). This will take you to the same dialog box that was used to place the graphic.
  3. Click on the Appearance tab at the top of the dialog box.
  4. In the Solid Border text box (the third one in the dialog box), enter the pixel thickness for the border.
  5. Click the OK button.

Try it! The color of the border will be the same as the text color. If the graphic is a link, the link color will be used.

White Space Around the Graphic

Extra "white" space can be placed around a graphic. Space can be placed above and below (same amount) and space can be placed to the left and right (same amount). To add space in Nvu ...

  1. Right-click on the graphic.
  2. Select the last command from the popup menu (Image Properties...). This will take you to the same dialog box that was used to place the graphic.
  3. Click on the Appearance tab at the top of the dialog box.
  4. Specify the spacing by using one or both of the following:
    • In the Left and Right text box (the first one in the dialog box), enter the desired spacing in pixels.
    • In the Top and Bottom text box (the second one in the dialog box), enter the desired spacing in pixels.
  5. Click the OK button.

Try it!

Size (i.e. Dimensions) of a Graphic

DESIGN NOTE: Even though HTML can adjust the size of a graphic, it is best to adjust a graphic's dimensions in a paint program and use the actual size of the graphic on the web page. Why? Several reasons, including:

Therefore, even though the web page can change an image's size, don't do it.


More Design Issues Related to Graphics on Web Pages

Chapter 4 of "Web Pages that Suck" (yes, this really is the name of a book) includes a list of common graphic problems and a list of don'ts for graphics. They are ...

Common Problems with Graphics

Too Big - According to the book, "The number one design mistake made on the Web is using large graphics, and almost everybody is guilty of committing it."

Using GIF Instead of JPEG (or JPEG instead of GIF) - Use GIF for graphics with few and distinctive colors (non-photos). Use JPEG for graphics with many colors that blend (photos). Why? Because the proper format will compress the file better resulting in a smaller file.

Size Parameters Don't Match the Actual Image Size - You can change the image size in the HTML file but you were told above NOT to do it. Instead use a graphic program to modify its size and then place the graphic on the web page.

Size Parameters Are Not Included - With size parameters, the browser can display the layout and text of the page before it gets the graphics (because it knows how big they are). Without these parameters, nothing can be displayed until all graphics are downloaded. Nvu automatically includes these parameters and therefore you shouldn't have this problem.

No Alternate Text - Not deadly, but alternate text should be included with every graphic.

Poor and/or Unnecessary Graphics - Examples include: not using a transparent background GIF when appropriate; poor color choices; to many animated GIF's (one may be to many); and too many special effects.

Graphics Don'ts


-------------------------

Lists

-------------------------

Introduction to Lists

It is very common to include lists of things on web pages. HTML includes five different types of lists. The two most common are:

Technically, list items are considered to be a special type of paragraphs. Unlike most other types of paragraphs, the paragraphs that make up list items are not separated by blank lines. The visual separator for ...


Unordered Lists

Unordered (i.e. bulleted) lists can be created from existing paragraphs (each paragraph becomes a list item) or one list item at a time. Once one of these lists have been created, more list items can be created by pressing the enter key at the end of any list item.

In Nvu, to create a bulleted list one item at a time ...

  1. Begin with the cursor in a new (empty) paragraph.
  2. From the Format menu, select the List submenu, and then select the Bulleted command.
  3. Type as many list items as needed, pressing the enter key after each item is typed.
  4. After the last item, press the enter key twice or move the cursor to some other location on the page.

In Nvu, to create a bulleted list from existing paragraphs ...

  1. Select all of the paragraphs that are to be a part of the list.
  2. From the Format menu, select the List submenu, and then select the Bulleted command.

Unordered lists can use three different symbols for the bullets, including ...

To change the symbol used for an unordered list,

  1. Right click anywhere on the list.
  2. Select List Properties ... from the popup menu (the list item in the menu)
  3. Use the Bullet Style popup menu in the dialog box to select the bullet type.
  4. Click on the OK button.

On your practice web page, create a bulleted list. Also, try changing the bullet style.


Ordered Lists

Ordered (i.e. numbered) lists can be created from existing paragraphs (each paragraph becomes a list item) or one list item at a time. Once one of these lists have been created, more list items can be created by pressing the enter key at the end of any list item.

In Nvu, to create a numbered list one item at a time ...

  1. Begin with the cursor in a new (empty) paragraph.
  2. From the Format menu, select the List submenu, and then select the Numbered command.
  3. Type as many list items as needed, pressing the enter key after each item is typed.
  4. After the last item, press the enter key twice or move the cursor to some other location on the page.

In Nvu, to create a numbered list from existing paragraphs ...

  1. Select all of the paragraphs that are to be a part of the list.
  2. From the Format menu, select the List submenu, and then select the Numbered command.

Ordered lists can use five different numbering schemes, including ...

Ordered lists can also have a starting numbering of any value.

To change the numbering scheme or beginning number for an ordered list,

  1. Right click anywhere on the list.
  2. Select List Properties ... from the popup menu (the list item in the menu)
  3. Use the Number Style popup menu in the dialog box to select the numbering type.
  4. (optional) If the numbering is to begin with something other than 1 (or I or i or A or a), enter the starting number in the Start at text box.
  5. Click on the OK button.

On your practice web page, try creating a numbered lists. Also, try changing the numbering style and/or beginning number.


Switching List Types

An ordered list can be changed to an unordered list, and vice versa. Proceed as follows:

  1. Select all of the list items that need to be changed.
  2. From the Format menu, select the List submenu, and then select the Bulleted or Numbered command.

Nested Lists

Sometimes, a list item will contain another list (of either type). For example:

  1. Paragraphs
  2. Lists
    • Bulleted
    • Numbered
  3. Graphics

In the above example, the bulleted list is nested inside the numbered list. This effect is accomplished using the Indent and Outdent buttons on the Format Toolbar.

If you are creating the nested items one at a time, while or before typing the first nested item click on the Indent button. After typing the last nested item type the Enter key and then click on the Outdent button. Finally continue creating the first level list. If necessary, change the list type and style as specified above.

If the list items already exist, select the items that need to be nested and then click the Indent button.

Try these options on your experiment page. Save and view your page in a browser before continuing.


-------------------------

Tables

-------------------------

What is a table?

A table provides the means for layout of text and graphics in rows and columns. A table may or may not include visible borders around the cells.

In general, a table consists of a fixed number of rows and columns. Any rectangle at the intersection of a row and column is called a cell. Parameters may be included that determine the ....


Creating a Table in Nvu

NOTE: Before creating a table, you should have a good idea of the number of rows and columns that will be needed. Rows and columns can be added and/or deleted later, but it will be a lot easier if you begin with the correct number of columns.

  1. Position the cursor where the table is to be placed.
  2. Click on the Table button in the Composition Toolbar.
  3. The dialog box includes three tabs.

On your practice page, create a table with two rows and three columns with a border size of 1 (do not specify a width ... that is, delete anything that might be in the width box ... this allows the content to determine the width).


Entering Data into the Cells of a Table

Each cell of a table can be treated like a little web page. Anything that can be put into a web page can be put into a table cell.

While entering data into a table in Nvu, use any of the following:


Changing Table Settings

As described above, there are several parameters that determine the layout and format of a table (far to many options to fully describe here). To change any of the table settings in Nvu ...

  1. Place the cursor in a cell of the table or select two or more cells of the table (by dragging)
  2. Either ...
    • Click on the Table button in the Composition Toolbar, or
    • Right click on the table and then select the Table Cell Properties command from the menu that pops up.
  3. Use the dialog box options to change table parameters.
    • Table tab options change characteristics of the entire table.
    • Cells tab options change the characteristics of individual or selected cells.
  4. Click the OK button when done.

Experiment with these options to see what they do.


Adding & Deleting Rows, Columns, and Tables

Rows, columns, and tables are added and deleted as follows:

  1. Right click on the table.
  2. From the popup menu, select the ...

Experiment with these options to see what they do. Experiment with any other table options you see.


Where to go from here...

If you understand the above concepts, you are ready to go to the next tutorial (Links: Internal, External, & Other Files)

[an error occurred while processing the directive]