Skip to main content

Learn HTML for beginner : Images

The img tag is used to put an image in an HTML document and it looks like this:

<img src="http://www.htmldog.com/badge1.gif" width="120" height="90" alt="HTML Dog">
The src attribute tells the browser where to find the image. Like the a tag, this can be absolute, as the above example demonstrates, but is usually relative. For example, if you create your own image and save it as “alienpie.jpg” in a directory called “images” then the code would be <img src="images/alienpie.jpg"...
The width and height attributes are necessary because if they are excluded, the browser will tend to calculate the size as the image loads, instead of when the page loads, which means that the layout of the document may jump around while the page is loading.
The alt attribute is the alternative description. This is an accessibility consideration, providing meaningful information for users who are unable to see the image (if they are visually impaired, for example).
Note that, like the br tag, because the img element does not enclose any content, no closing tag is required.




Popular posts from this blog

Free tips to save yourself from phishing

Free tips to save yourself from phishing Phishing is a type of social building method utilized by programmers to assemble delicate data, for example, usernames, passwords and Visa points of interest by acting like a trustworty individual/association. Since most online clients are ignorant of the methods utilized as a part of completing a phishing assault, they regularly fall exploited people

get free google adsense in 24 hours tips and tricks : 2

get google adsense free tips and tricks :  2 Hello individuals. You may already know that search engines brings in all-around $761. 71 each second. This uncomplicated supply advertising which usually obtain placed on the websites and websites and search engines obtain payed as someone visit them. Just about every beginner doodlekit when when tried out to come up with a few profit through it's