Home Blog Archive Internet Images with the HTML to insert - so it goes

Images with the HTML to insert - so it goes

  • Oct 25, 2025
  • 477
  • 0

You want to insert HTML images on your web site, use the img Tag. What you need to pay attention, read here.

To insert images with HTML - The basics

  • With the Tag you can insert images.
  • Inside the tag is the image source: added file "testbild.jpg" from the subfolder "images" on the website.
  • Also to external sources via a URL are possible: binds the CHIP Logo from our servers.

HTML-attributes for embedded images

Within the img-Tags, many attributes you can add:
  • What size is the picture on the Website is presented, set with "width" and "height" are The image is, therefore, a square with a side length of 100 pixels is displayed.
  • With "alt" to specify an Alternative Text that will be displayed when the image cannot be loaded. This attribute should always enter, if you insert images with HTML.
  • The attribute "border" specifies the thickness of the frame in pixels. A picture with a five-Pixel thick frame.
  • Over "align" to align the graphics. Values for this attribute bottom", "top", "middle", "left", "right" and "center "are".
  • With the "hspace" and "vspace" allows you to define (horizontally and vertically) at a distance to the image.

HTML example

  • As a result, the CHIP is a Logo from our website.
  • It is shown with a height of 100 pixels and a width of 200 pixels.
  • It can't be loaded, it will display "CHIP-Logo" as a blank text.
  • The image is surrounded by a two Pixel wide frame.
  • It is placed flush and to the other elements on the page at a distance of 50 pixels.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =