Pictures in Tables on Pages. Oh My!

Pictures in Tables on Pages. Oh My!

Page Type Page Type: Article

 




Apologies to the Wizard of Oz for the title. I just couldn’t resist!

Though Summitpost has a perfectly good (and easy) way to intermingle pictures with text on a page, for some reason I can’t quite explain, there have been times when I wanted to put images on a page in ways that couldn’t be achieved so simply. So, I began to research. With the help of some generous Summitpost members, the SP FAQ page, perusing the Forums, plus a little searching on the web, I now have a little more control over picture placement.

Since I consider Summitpost to be a community of shared resources, I thought it fitting that I share what I've learned about tables and pictures. I hope to keep this article as “dynamic” as possible. As I learn more, and, as I receive suggestions, I'll make additions.

Though I hope this article will go part way toward providing help in the "how to" for tables and pictures, here are a few additional places to get information about HTML, tables, and pictures.

SP FAQ

Page Help Forum

Web Source - HTML Help

The Fast and Easy Way to Make a Table on Summitpost

W3C School

HTML Code Tutorial



The Standard Summitpost Picture

When you use the "Insert Image" button to place images on your pages, pictures display in a fashion similar to this.
PicaMy little buddy, the Pica


The HTML code which is inserted... [ img:248632:alignleft:small:Pica ]

The advantages are...

    o - It's a fast and easy way to insert a picture into your text,
    o - You have control over the size (thumbnail, small, medium),
    o - Using the "standard" procedure allows you to include caption text with the picture;
    o - The picture is "clickable" - that is, when you click on the picture with your mouse,
          you see the picture's "page" with its additional options for viewing, voting, etc.


One disadvantage of using this method is, your pictures always have a border placed around them.

Displaying a Small Picture Without a Border

If you don't want a border around your picture, you can use the following html code.

< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206215.jpg" > - where to find the picture for display



However, controlling placement of the picture on the page (left, center, right) requires a bit more code.


< p align="left" > - left justify the paragraph (image)
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206215.jpg" >
- where to find the picture for display
< /p >
- end paragraph positioning





< p align="center" > - center the paragraph (image)
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206215.jpg" >
- where to find the picture for display
< /p >
- end paragraph positioning




< p align="right" > - right justify the paragraph (image)
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206215.jpg" >
- where to find the picture for display
< /p >
- end paragraph positioning



You may have to change the filename extension ".jpg" to all caps ".JPG" to get your picture to display.
It all depends upon how the picture was saved when you uploaded it to Summitpost.
If you used lowercase for the ".jpg" filename extension and your picture looks like this , just change the filename extension to uppercase. The reverse (changing .JPG to .jpg) may also be required.

Please note that you are going to have to remove spaces to the right of the < symbol and to the left of the > symbol in the above examples and in all that follow. I have included extra spaces and lines in the example HTML code for clarity and to allow room for explanations.

You will not be able to just cut and paste. Some editing will be required on your part before the code (as it appears on this page) will operate correctly.


Displaying a Medium Picture Without a Border

Pictures in medium and large size can also be displayed without a border. You have the option of placing each picture left, center, or right on the page by using the < p align="..." > code sequence.

BUT, don't forget to include < /p > (ends the alignment code sequence) in the HTML code immediately following the code for displaying your picture; otherwise everything which follows will be placed in the same horizontal position you picked for image placement.


< p align="center" > - center the paragraph (image)
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-500/204161.jpg" >
- where to find the picture for display
< /p >
- end paragraph positioning



Displaying a Large Picture Without a Border


< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-1024/252351.JPG" > - where to find the picture for display

Because the image will be bigger than most peoples' screens, displaying a large picture on Summitpost is something you should do sparingly, if ever.


Pictures in Tables

There are times when you want to show pictures in a format similar to the way they are displayed on a Summitpost Album.
The following method will not duplicate an Album display exactly, but in most cases will suffice.

The concept here is to set up a table, then, use the "Insert Image" button to place a picture in each cell.

In most cases, medium- and large-sized pictures are too big to be used in this situation.

Tables "auto-adjust" to the size of picture you choose to display (thumb or small)
and for a mixture of picture formats (verticle and horizontal).


This is the HTML code required to display the following table of pictures.


< noformat > - clears all previous formatting
< table border="1"
- sets the size of the table's border
    bordercolor="993300"
- establishes the color of the table's border
    cellspacing="2"
- sets the distance between the table's cells
    cellpadding="2" >
- sets the space between the cell's edge and its contents
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
          [ img:237979:aligncenter:small:Gem Lake Reflections, #1. ]
- insert the image
< /th >
- ends a cell in the table
< th > [ img:237978:aligncenter:small:Gem Lake Reflections, #2. ] < /th >
- begin cell - insert the image - end cell
< th > [ img:237980:aligncenter:small:Gem Lake Reflections, #3. ] < /th >
- begin cell - insert the image - end cell
< /tr >
- end the first (top) row
< tr >
- begin the next row
< th > [ img:237981:aligncenter:small:Gem Lake Reflections, #4. ] < /th >
- begin cell - insert the image - end cell
< th > [ img:236764:aligncenter:small:Vernon being reflective. ] < /th >
- begin cell - insert the image - end cell
< th > [ img:237983:aligncenter:small:Gem Lake Reflections, #5. ] < /th >
- begin cell - insert the image - end cell
< /tr >
- end the row
< /table >
- end the table
< /noformat >
- end noformat


Gem Lake Reflections, #1.Gem Lake Reflections, #1.
Gem Lake Reflections, #2.Gem Lake Reflections, #2.
Gem Lake Reflections, #3.Gem Lake Reflections, #3.
Gem Lake Reflections, #4.Gem Lake Reflections, #4.
Vernon at Gem LakeVernon being reflective.
Gem Lake Reflections, #5.Gem Lake Reflections, #5.

Picture Tables - Small Pictures - Pictures Without Borders

If you don't want the pictures included in your table to have individual borders, it requres different HTML code for the display
of each image. Compare the following code with that in the above table to see the differences. The code for the "table" is unchanged.

Be aware that when using this method to diplay your pictures without individual borders, the images are no longer "clickable."


< noformat > - clears all previous formatting
< table border="1"
- sets the size of the table's border
    bordercolor="993300"
- establishes the color of the table's border
    cellspacing="2"
- sets the distance between the table's cells
    cellpadding="2" >
- sets the space between the cell's edge and its contents
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/204161.jpg" >
- where to find the picture for display
< /th >
- ends a cell in the table
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206216.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/234691.JPG" > < /th >
< /tr >
- end the first (top) row
< tr >
- begin the next row
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/236759.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206223.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/242293.JPG" > < /th >
< /tr >
- end the row
< /table >
- end the table
< /noformat >
- end noformat


Notice that some of the images require the use of a "JPG" filename extension rather than "jpg."
Expect this to be the case fairly often.

Besides the obvious fact that different pictures are being displayed in the table above and that below, there is
one other (and more meaningful) difference - the HTML code used to find and display each image.



[ img:234691:aligncenter:small:Trapper Peak ]
- clickable but with a border
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/234691.JPG" >
- no border but not clickable



Picture Tables - Thumbnail Pictures - Pictures Without Borders

The required change to the html code is minimal if all you want to do is reduce the picture size from small to thumbnail.

If you compare the following code with that just above to see the difference, you'll see the only difference is...

< th > < img class="lozad img-responsive" data-src="/images/small/206223.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="/images/thumb/206223.jpg" > < /th >



< noformat > - clears all previous formatting
< table border="1"
- sets the size of the table's border
    bordercolor="993300"
- establishes the color of the table's border
    cellspacing="2"
- sets the distance between the table's cells
    cellpadding="2" >
- sets the space between the cell's edge and its contents
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/237113.JPG" >
- where to find the picture for display
< /th >
- ends a cell in the table
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/243091.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/242287.JPG" > < /th >
< /tr >
- end the first (top) row
< tr >
- begin the next row
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/252351.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/206223.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/230870.JPG" > < /th >
< /tr >
- end the row
< /table >
- end the table
< /noformat >
- end noformat




Picture Tables - 50 x 50 Pixel Pictures - Pictures Without Borders

There is one additional picture size available on Summitpost, a small, 50 x 50 pixel image. Summitpost creates and keeps these small copies (of every uploaded picture) in the "avatars" sub-directory. If you wish to use these small representative images in a table format, use the following html code.

The difference is...

< th > < img class="lozad img-responsive" data-src="/images/thumb/206223.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="/images/avatars/206223.jpg" > < /th >



< noformat > - clears all previous formatting
< table border="1"
- sets the size of the table's border
    bordercolor="993300"
- establishes the color of the table's border
    cellspacing="2"
- sets the distance between the table's cells
    cellpadding="2" >
- sets the space between the cell's edge and its contents
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/237113.JPG" >
- where to find the picture for display
< /th >
- ends a cell in the table
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/243091.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/242287.JPG" > < /th >
< /tr >
- end the first (top) row
< tr >
- begin the next row
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/252351.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/206232.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60/230870.JPG" > < /th >
< /tr >
- end the row
< /table >
- end the table
< /noformat >
- end noformat




Changing a Table's Visual Features

Now let's play with the borders and background of the tables.

Increasing the "border" from a value of 1 to 10 gives the following result.


< noformat >
< table border="10" bordercolor="993300" cellspacing="2" cellpadding="2" >
< tr >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/237113.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/243091.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/242287.JPG" > < /th >
< /tr >
< tr >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/252351.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/206232.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/230870.JPG" > < /th >
< /tr >
< /table >
< /noformat >





To change the color of the border, change the "bordercolor" value.


From < table border="10" bordercolor="993300" cellspacing="2" cellpadding="2" >

To < table border="10" bordercolor="ff0033" cellspacing="2" cellpadding="2" >


Values for colors which are "good" to use can be found at... Web Source



To change the spacing between the table's cells, change the value of "cellspacing".


From < table border="10" bordercolor="ff0033" cellspacing="2" cellpadding="2" >

To < table border="10" bordercolor="ff0033" cellspacing="10" cellpadding="2" >




To change the space between each cell's border and the edge of the pictures, change the "cellpadding" value.


From < table border="10" bordercolor="ff0033" cellspacing="10" cellpadding="2" >

To < table border="10" bordercolor="ff0033" cellspacing="10" cellpadding="10" >




You can give color to the table's background by using "bgcolor".


From < table border="10" bordercolor="ff0033" cellspacing="10" cellpadding="10" >

To < table border="10" bordercolor="ff0033" cellspacing="10" cellpadding="10" bgcolor="00ff66" >


Again, values for colors which are "good" to use can be found at... Web Source



Making changes to just these five table-defining values, gives a substantial amount of control over how tables look.

    o border - controls the size of the table's border
    o bordercolor - controls the color of the table's border
    o cellspacing - controls the amount of space between the table's cells
    o cellpadding - controls the amount of space between the image and the edge of the cell
    o bgcolor - controls the background color of the table

Picture Tables - Pictures Without Borders - Invisible Table Border

There are times when you want to display pictures using a table format but do not want the table to be visible (that is, no borders and no lines between cells). This can be managed by setting the value of "border" to zero.

If you wish, for the sake of simplicity, you may also remove "border" from the table's "definition" and accomplish the same result - no visible border.

Of course, if the border is no longer visible, "bordercolor" is no longer needed and may be removed from the table's "definition."

You may still want to set the values of "cellspacing" and "cellpadding" to control how the pictures are spaced on the screen, but it's not required.



< noformat >
< table border="0" cellspacing="0" cellpadding="2" >
< tr >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/237113.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/243091.jpg" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/242287.JPG" > < /th >
< /tr >
< tr >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/252351.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/206232.JPG" > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/230870.JPG" > < /th >
< /tr >
< /table >
< /noformat >



Clickable Captions

One of the problems with NOT using the "standard" method ("Insert Image" button) for adding pictures, is that the images are not "clickable." That can be remedied quite easily in a table by adding a "clickable" caption beneath each picture.


< noformat > - clears all previous formatting
< table
- begins the table definition
    border="0"
- sets the size of the table's border to zero so it will not be visible
    cellspacing="0"
- sets the distance between the table's cells (this line of code is not required)
    cellpadding="2" >
- sets the space between the cell's edge and its contents
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/237113.JPG" >
- points to image which should be displayed
< br >
- a linebreak so the "clickable" text will appear below the cell's image
< a href="https://www.summitpost.org/view_object.php?object_id=237113" > North Trapper < /a >

                                                                  - location of the cell's (clickable) image and the text which will appear on screen
< /th >
- ends the cell
< th >
- begins the next cell
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/243091.jpg" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=243091" > Rattle Snake < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/242287.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=242287" > Wolf Sign < /a >
< /th >
< /tr >
- ends first (top) row of the table
< tr >
- begins the next row in the table
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/252351.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=252351" > Ski Trail < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/206232.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=206232" > Buddies < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-100/230870.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=230870" > Larch Fall Color < /a >
< /th >
< /tr >
- ends the row
< /table >
- ends the table
< /noformat >
- ends the "noformat" command




Here is another table with "clickable" captions (and a few different pictures), this time with the table visible and a little background color.


< noformat > - clears all previous formatting
< table
- begins the table definition
    border="10"
- sets the size of the table's border
    bordercolor="ff0033"
- establishes the color of the table's border
    cellspacing="8"
- sets the distance between the table's cells
    cellpadding="8"
- sets the space between the cell's edge and its contents
    bgcolor="ff6666" >
- establishes the color of the table's background
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/206215.jpg" >
- points to image which should be displayed
< br >
- a linebreak so the "clickable" text will appear below the cell's image
< a href="https://www.summitpost.org/view_object.php?object_id=206215" > Bald Eagle < /a >

                                                                                                                        - location of the cell's (clickable) image
< /th >
- ends the cell
< th >
- begins the next cell
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/205851.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=205851" > Mountain Heather < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252343.jpg" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=252343" > Fall Sunrise < /a > < /th >
< /tr >
- ends first (top) row of the table
< tr >
- begins the next row in the table
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252348.jpg" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=252348" > Melting Snow < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252351.JPG" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=252351" > Ski Trail < /a > < /th >
< th > < img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252333.jpg" > < br >
< a href="https://www.summitpost.org/view_object.php?object_id=252333" > Frosted Trees < /a > < /th >
< /tr >
- ends the row
< /table >
- ends the table
< /noformat >
- ends the "noformat" command



Clickable Pictures Without Borders

There is another solution for making borderless pictures clickable, one which I think is a bit more elegant.

Using this method not only makes the image clickable, but when the viewer moves the mouse pointer over the picture, the name (title) of the picture appears in a little box, thus eliminating the need for captions, clickable or otherwise.


< a href="https://www.summitpost.org/view_object.php?object_id=252348" > - clickable link to the picture's page
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-500/252348.jpg"
- where to get the picture for display
    title="Melting Snow" >
- the picture's name
< /a >
- end link




Clickable Pictures With Borders

Now that we've gone to all the trouble of eliminating the "default" border from a picture while retaining the picture's "clickability", we can make things more complicated by adding a border of our own to the picture.

Two methods come to mind. One uses a single-celled table to place the border.


< noformat > - clears all previous formatting
< table
- begins the table definition
    border="10"
- sets the size of the table's border
    bordercolor="ff0033"
- establishes the color of the table's border
    cellspacing="8"
- sets the distance between the table's cells
    cellpadding="8"
- sets the space between the cell's edge and its contents
    bgcolor="0" >
- establishes the color of the table's background
< tr >
- begins the only row of the table
< th >
- begins the only cell in the table
< a href="https://www.summitpost.org/view_object.php?object_id=243086" >
- clickable link to the picture's page
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-500/243086.jpg"
- where to get the picture for display
    title="Camas & Stump" >
- the picture's name
< /a >
- end link
< /th >
- ends the only cell
< /tr >
- ends the only row
< /table >
- ends the table
< /noformat >
- ends the "noformat" command





The other method uses "style" to define the border. This is a good method to use when you're displaying only one picture and you don't want the border to look like those which appear around tables.

If you use the current version of Internet Explorer, you will see no difference between a border using the table method and one using the “style” method (assuming you have the same size border and use the same colors). However, if your browser is Mozilla Foxfire, you will see a difference. I use Mozilla Foxfire most of the time and included the two methods for others who also do.


< a href="https://www.summitpost.org/view_object.php?object_id=252343" > - clickable link to the picture's page
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-500/252343.jpg"
- where to get the picture for display
    title="Fall Sunrise Over Pond"
- the picture's name
    style="border-style: solid;
- sets the border style
    border-width: 15px;
- sets the border width
    border-color: red;" >
- sets the border color
< /a >
- end link




Displaying Pictures in Non-Standard Sizes

There are times when you want to put a picture on a page that is differently-sized from the standard large, medium, small, or thumbnail image. Fortunately there are two atributes of "img" which can provide a bit of help - "width" and "height."

Be advised if you include both of these attributes for the display of a single image, you are likely to cause the picture to be distorted (unless you are VERY careful with your math). If you specify just one of the attributes - "width" or "height" - the image will be automatically (and correctly) scaled by the browser. There may be instances when including both is appropriate; you either wish to distort the image, or, a slight distortion won't matter.


< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-500/205862.JPG" - where to find the picture for display
    width="350px"
- set the width
    height="460px" >
- set the height



Notice the above example points to the "medium" version of the image. Although you might think that pointing to the "original", "large", or "small" version would work just as well because the HTML code establishes the exact size to be placed on the screen, you'd only be partially correct. Pointing to a too-small picture, then stretching it to a larger size for display, will make the image look blocky and low-resolution. It's better to point to a too-large picture file and "reduce" it to fit into a smaller space. Best however, is to pick the appropriately-sized picture file which only needs to be reduced a small amount to fit your allotted space.

Last Table

Here is one last table with a new set of pictures, all of which are "clickable" and have titles which appear when you hover your mouse over the image.

Notice that I've chosen to set both the "width" and "height" attributes. I wanted to make sure each image was similarly sized for use in the table display and knew, that in this case, a slight distortion of the images wouldn't matter.


< noformat > - clears all previous formatting
< table
- begins the table definition
    border="20"
- sets the size of the table's border
    bordercolor="green"
- establishes the color of the table's border
    bgcolor="red" >
- establishes the color of the table's background
< tr >
- begins the first (top) row of the table
< th >
- begins a cell in the table
< a href="https://www.summitpost.org/view_object.php?object_id=252345" >
- clickable link to the picture's page
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252345.jpg"
- where to get the picture for display
    width="200px"
- set width to 200 pixels
    height="135px"
- set height to 135 pixels
    title="Fall Sunset" >
- set picture's name
< /a >
- end link
< /th >
- end cell
< th >
- begin next cell
< a href="https://www.summitpost.org/view_object.php?object_id=252342" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252342.jpg" width="200px" height="135px"
    title="Spring Oak Leaves" > < /a >
< /th >
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=256161" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/256161.JPG" width="200px" height="135px"
    title="Snow Covered Trees" > < /a >
< /th >
< /tr >
- end row
< tr >
- begin next row
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=243082" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/243082.jpg" width="200px" height="135px"
    title="Mountain Primrose" > < /a >
< /th >
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=205992" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/205992.jpg" width="200px" height="135px"
    title="Indian Paintbrush" > < /a >
< /th >
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=252326" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252326.jpg" width="200px" height="135px"
    title="Aspen Trees" > < /a >
< /th >
< /tr >
- end row
< tr >
- begin next row
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=252334" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252334.jpg" width="200px" height="135px"
    title="Maple Leaves" > < /a >
< /th >
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=252338" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/252338.jpg" width="200px" height="135px"
    title="Early Morning Light on Ponderosa Pines" > < /a >
< /th >
< th >
< a href="https://www.summitpost.org/view_object.php?object_id=236753" >
< img class="lozad img-responsive" data-src="https://images-sp.summitpost.org/tr:e-sharpen,e-contrast-1,fit-max,q-60,w-200/236753.JPG" width="200px" height="135px"
    title="Rocks on Baker Point" > < /a >
< /th >
< /tr >
- end row
< /table >
- end table
< /noformat >
- end noformat



Summary

Tables provide a good method for displaying images and closely-related text in a block-type format. I hope the above information will help in your use of tables, especially for pictures.

Remember, a table in its simplest form requires no more code than...


< table > - start the table
< tr >
- start a row
< th > Cell Contents < /th >
start cell - insert contents - end cell
...
- repeat cells as required
...
< /tr >
- end the row
...
- repeat rows and cells as required
...
< /table >
- end the table

If you're interested in more help with the HTML required for tables, have a look at Setting Tables Using HTML.

Each cell's contents is up to you and may consist of text, pictures, a combination of the two, or, if you really want to
make things complicated, another table. Now THAT sounds like fun!


Comments

Post a Comment
Viewing: 21-37 of 37
12
Michael Hoyt

Michael Hoyt - Dec 21, 2006 5:49 pm - Hasn't voted

Re: Great Stuff!

Thanks for the comment, though "teachings" might be a bit much. I think "collector" or "conduit" may be more appropriate. I don't know enough (yet) to be considered a teacher.

MoapaPk

MoapaPk - Dec 23, 2006 2:56 am - Voted 10/10

I hope I remember...

...this great article! Maybe it should be distilled as its own FAQ.

Michael Hoyt

Michael Hoyt - Dec 23, 2006 4:49 pm - Hasn't voted

Re: I hope I remember...

Thanks. You're too kind!

Michael Hoyt

Michael Hoyt - Dec 27, 2006 9:46 pm - Hasn't voted

Re: Overdue

Thanks. Sometimes I actually manage to do something right.

Aaron Johnson

Aaron Johnson - Dec 31, 2006 9:05 pm - Voted 10/10

Very Helpful

And you did a load of work on it, too! I'll be referring to your article in the future! Thank you!

Michael Hoyt

Michael Hoyt - Dec 31, 2006 11:35 pm - Hasn't voted

Re: Very Helpful

Thanks Aaron,

I've learned a lot from the work you have (and continue to) put into Summitpost. If I'm able to give back just a little, it's my pleasure.

IceRavines

IceRavines - Mar 19, 2007 1:43 pm - Voted 10/10

I actually learned something!

I should have read this a while ago...I found it to be of emense help to make presentations more professional looking ! Thanks.

johnm

johnm - Jun 22, 2007 12:47 am - Hasn't voted

Step 2

Well after learning to set the table (Your HTML basics Tutorial) I decided to try a second table with images and clickable icons. works great. Thanks again!

Bor

Bor - Sep 28, 2007 2:26 am - Voted 10/10

Great!

Very good and useful article!

Thanks and cheers!

D-bo

D-bo - Jun 11, 2009 2:00 pm - Voted 10/10

Helpful once again

This came in handy for my Coyote Gulch page. Thanks again

Michael Hoyt

Michael Hoyt - Jun 11, 2009 6:57 pm - Hasn't voted

Re: Helpful once again

Thanks. Glad to be of help and, our Coyote Gulch page looks very nice.

JoeyBagoDonuts

JoeyBagoDonuts - Aug 19, 2009 9:37 pm - Hasn't voted

Thanks!

I feel a little less like a moron now. Appreciate the help and the info!!

Michael Hoyt

Michael Hoyt - Aug 20, 2009 12:03 pm - Hasn't voted

Re: Thanks!

There was no reason to feel like a "moron" in the first place. HTML is not something which is required on a daily basis. Nonetheless, I would be remiss if I did not now welcome you to "The World of Nerds."

mrchad9

mrchad9 - Apr 8, 2010 8:18 pm - Voted 10/10

Invaluable

I've never done any html at all before coming to SP recently, and this information is so helpful. I refer back to it all the time and it's become a critical recource in my recent submissions- I'm hopeless without it. Thanks for putting this together for all of us!

Michael Hoyt

Michael Hoyt - Apr 11, 2010 1:08 pm - Hasn't voted

Re: Invaluable

I'm happy it was helpful. Always glad to help when I can.

Mike

cobabuka - Jan 16, 2012 8:56 am - Hasn't voted

really great

i just read your all discussion guys... that awesome.

[url=http://cobabuka.com/century-21-broker-properti-jual-beli-sewa-rumah-indonesiaku.html]Century 21 Broker Properti Jual Beli Sewa Rumah Indonesia[/url]
[url=http://cobabuka.com]Kumpulan Artikel,Tutorial & Media Informasi[/url]

packrat - Mar 25, 2013 7:10 pm - Hasn't voted

Posting Images

I tried to post a picture and it did not work. I will have to read through the information here later.

Viewing: 21-37 of 37
12

Parents 

Parents

Parents refers to a larger category under which an object falls. For example, theAconcagua mountain page has the 'Aconcagua Group' and the 'Seven Summits' asparents and is a parent itself to many routes, photos, and Trip Reports.