How do I post a picture in the d2jsp forum

Include photos, images and graphics in HTML pages - how, what, where, how big

There are 3 graphic formats that can be considered. These 3 formats are supported by all browsers. JPG, PNG and GIF are the graphic formats used on the internet today.

If you see an image in the browser, you can right-click the image in Internet Explorer. You will then get a menu - the last item “Properties” shows the name, the file size and the dimensions of the image.

Each image can also be saved on your own hard drive with the right mouse button (please pay attention to the copyright!). In the menu that you get with the right mouse button, there is the item "save as ...". Now you can save the picture on your hard drive. Do this with the following picture “learn HTML now” and save the picture in the file folder in which you have previously saved your HTML files (index.htm, about-me.htm)! It is extremely important that the image is in the folder containing the HTML file. Otherwise the browser will not find the picture later and cannot display it!

Sometimes the IE changes the ending - instead of .jpg there is then .jpeg - then either rename it again or integrate it as html-seminar.jpeg.

We integrate this image as an example on the start page (index.htm). The basic structure of the HTML command for this is:

(img = engl. in theaGe = picture)
(src = engl. source = source)

In the browser it comes out as follows:

There are other attributes for images that are very important for various reasons.

attribute importance
width = "X" The width X of the image - should be specified so that the browser can provide the placeholder in the appropriate size, as long as the image has not yet been completely transferred!
height = "Y" The height of the image - should be specified so that the browser can provide the placeholder in the appropriate size, as long as the image has not yet been completely transferred!
alt = "DECLARATION ON THE PICTURE" The OLDernativtext - this is very important for various reasons:
  • for the visually impaired (who have it read out by special browsers)
  • for search engines, as they also index this text
  • for information for visitors when images are switched off
title = "Tooltip for mouse click"This text appears as a tooltip (also called mouse-over) when you move the mouse pointer over the image and then let the mouse rest on it.

So the complete code looks like this:

More order through directories

And if you want to have more order in the directory, create a subdirectory for your pictures, e.g. with the folder name "pictures" and then write:

Which format should I use?

The differences between the formats are shown in the following table. If you can't make up your mind, save the image you want using an image editing program in both GIF and JPG and look at the file size.

Format differences:GIFJPGPNG
Number of colors:25616.7 million16.7 million
Animation options:YesNoNo
Compression options:automaticallyAdjustable degree of compressionAdjustable degree of compression
Fitness:small graphics, logos, animated graphicsPictures with many colors (photos)Pictures with many colors (photos)
Specialty:The display is gradual, so the surfer can guess earlier what kind of picture is coming.offers transparent areas

Transmission times depending on the line speed using the example of a graphic with 100 kilobytes (kB) can be found in the next section under General transmission times.

Pay attention to the file size, especially with graphics. If the files become too big, which, depending on your taste, starts at 100 kB, the WWW for slow access (e.g. modem) develops from the “World Wide Web” to the “World Wide” Wait". Therefore, it is important to pay attention to the file size. True to the motto: less is more. This often develops into a tightrope walk between image quality and transmission speed.

In order to meet the requirements of the WWW, the data size of an image should be as small as possible. It should also be borne in mind that time is money and causes special costs (e.g. for mobile phones when there is no flat rate), which should be avoided as far as possible. Not everyone has fast internet access!

GIF file format

The GIF (Graphics Interchange Format) file format was the first format on the Internet and was developed by CompuServe. It caught on because, in addition to its advantages and possibilities, it was available royalty-free for the first time. The GIF file has a palette of 256 colors and is additionally compressed. The GIF format has the advantage that it can be built up in stages during the loading process (called "interlaced"), which means that the viewer does not seem to have to wait so long for longer loading times, since the image is blurred but already recognizable builds up. Another feature of GIF is that you can display animated sequences that consist of a sequence of GIFs. In this way, you can save smaller animations in a single image file, which then run independently (see e.g. traffic sign). With GIFs, a color can also be displayed transparently, which has the advantage that you cannot see it in the browser and you can thus play with the backgrounds without having to take the position of the graphic into account. In this way, graphics in the foreground can be integrated harmoniously without the background being disruptive. As an example, a rock structure can be selected as the background and the company logo as the foreground graphic, which blends in seamlessly thanks to the transparent color. With a star (I don't want to name a Stuttgart car manufacturer here), the background can then come into its own through the inner circle segments.

JPG file format

Up to 16.7 million colors can be saved in JPEG format (Joint Photographic Experts Group). Hence, it is also most common for displaying photos and other halftone images in files on the Internet. The great advantage of JPEG is that a degree of compression can be set. Thus, a file can be reduced to a minimum.

PNG file format

PNG (portable network graphics) is a raster format. The disadvantages of GIF and JPG are absent in this format, but there are many advantages. All colors can be displayed, the compression is lossless (which cannot be said for JPG) and there is the possibility of creating transparent areas. Alpha channels are used for these transparencies. Graphics can be used on any colored background, for example.

A small disadvantage is that very old browser versions have a few problems with the PNG format. For example, the transparent areas are then not displayed transparently. But primarily applies to very old browsers!

Animation of pictures

GIF graphics are animated using individual images, as in the following traffic sign, the one from the citizens' initiative for animated traffic signs Bifaz was made available to us.

Now the individual pictures:

Such animations are of course more complex, because not only 1 picture is required, but numerous and if you are not careful, the file size of the graphic will be huge.

There are numerous programs for creating such animations. More on this in the chapter on software

Transmission duration in general

To get an impression of the transfer times of a file (regardless of whether it is a homepage, a picture or both together), I give approximate values. These can also be negatively influenced by the load on the network.

With a file size of 108 kB, the transmission times are depending on the type of transmission, i.e. what modem speed, ISDN or DSL is used:

Transmission speedTransmission time
14.4k 62.39 seconds
28.8k 32.20 seconds
56k 17.36 seconds
ISDN (128k) 8.79 seconds
T1 (1.44 MB) 2.60 seconds

The rule of thumb for good websites is: no more than 60 kB for text, background image, logos and other images to exceed! Otherwise the transmission times will be too long and impatient surfers have already surfed on (to another page - the faithless tomatoes).

Copyright of images

I. d. As a rule, images and graphics (including areas thereof) are subject to copyright - i.e. someone has the rights to the work. Therefore, in order to avoid legal problems, you should either only use your own works or ask the copyright owner whether he or she agrees to use them on your homepage. Using the example of the traffic sign used above, it was a friendly e-mail that came back quickly and in a friendly manner together with the confirmation.

Tip: Links with graphics - link picture

Even if I am not a friend of links with graphics, since they - apart from being playful - do not add any added value and still have the disadvantage of increased transmission time, I do not want to withhold this option from you.

With what you know so far, you can. Combine just a link and a graphic


HTML TAG: graphic

And as a combination, the whole thing looks like this:

The picture is therefore enclosed by the link, and so the surfer comes to the page that was specified in the link after clicking on the picture.

The variant is even more clever, if you do not want to have the graphic on your web server or hard drive, to specify it directly from the external site (should be approved by the external site).

PS: In principle, I am pleased about this way of including a small note on So go ahead! This is also good practice.

Recommend • Social Bookmarks • Thank you

If you find a bug, please let us know (no matter if typographical or content-related error).

With a mouse Mark the faulty point and take over with the following button:

After submitting it comes feedback! Please do not send twice. Thanks.