Tuesday, May 22, 2018

Web Programming Lessons - HTML - Images

Let us start with a quick minimum example:
<img src="abc.jpg" />

Result : 











And let us also have a look at more extended example:
<img src="abc.jpg" alt="Photograph of abc"
     title="Photograph of abc" />
Images are normally stored in external files. To place an image into an HTML source, use the img tag with the src attribute containing the URL of the image file. To support browsers that cannot render images, you can provide the alt attribute with a textual description of the image. To provide a tooltip to the image, use the titleattribute.
The space before the /> in the examples is there on purpose. Some older browsers behave strangely if the space is omitted.

No comments:

Post a Comment