Q and A for COSC171 Class

Answers to Questions about Tables, Images, Links and More.

Q1: How do I horizontally align tables?

A1: Create a table of tables, where each table is a separate data cell Tables within a Table

Q2: How do I control the width of a table?

A2: Use the "width" property to control the table width. Numbers can be in pixels or percentages. Width of Tables

Q3: How do I indent a single line or section of text?

A3: Use "margin-left or margin-right" to indent a section of text. The answers in this QandA indented using "margin-left:20px" Indenting Text

Q4: How do I change the colors of links?

A4: Change the values of a:link, a:active, a:visited in the HEAD section. Changing Link Colors

Q5: How do I align an image next to a table?

A5 (Option #1): Add the image to the table, using rowspan or colspan as needed. See classmate's site, as an example. Alexa's Babysitting Site

A5 (Option #2): "Float" the image to the left or right of the table. Floating HTML Elements

The image is floating to the left of the table, so that the table and image begin at the same vertical position. The image is floating to the left of the table, so that the table and image begin at the same vertical position. The image is floating to the left of the table, so that the table and image begin at the same vertical position. .

Q6: How do I add a margin to the entire page?

A6: Use "padding" Cell Padding Examples

Any other questions?

See HTML or CSS tutorials for help. W3Schools Tutorials