|
Web Graphics Home
Web Graphics TutorialAbout Web GraphicsGraphics Software Photo Editors Illustration Software Exporting to Web Format Uploading Images to the Web Embedding Images into a Web Page How to use a Scanner Free Web GraphicsFree IconsFree Logos Free Clip Art Free Background Patterns FREE Hosting!With every domain name you register with ZappyHost, you get FREE hosting.$1.99 Domain NamesWith every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99. |
Embedding Images into a Web PageOnce you've created your image, saved it as either GIF or JPEG format, then uploaded it to a web server, you can embed it into a web page. Embedding an image into a web page is done using HTML. HTML has a special tag for this - the img tag. Using the img tag, you can embed any image on the Internet. Here's an example:
<img src="http://www.quackit.com/pix/routeburn_track/routeburn_flats_t.jpg" width="225" height="151" alt="Photo of Routeburn Flats, on the Routeburn Track in New Zealand." />
Result:
You can learn more about HTML and images with the HTML images lesson of the HTML tutorial. You might also be interested in image maps Height and WidthYou'll notice that the 'img' tag allows you to provide a width and height. Although this is optional, you should provide these, as it allows the browser to allocate the correct amount of space on the web page before the image loads. Also, you should use the exact dimensions of the actual image. Changing this doesn't change the actual download size of the image - it just forces a larger/smaller image into a different space. If you need to change the size of an image, for best results, resize it in your photo editor or illustration package. Background ImagesYou can use the CSS background-image property, or if you prefer, the background property to display a background image. The image could be displayed on the background of any HTML element - background of the whole page, a table cell, a div element etc. Example of the CSS code for displaying a background image:
background-image:url(http://www.quackit.com/pix/smile.gif);
You can learn more about CSS background code with the CSS background code lesson of the CSS tutorial. Enjoy this website?
Oh, and thank you for supporting Quackit! |
Need Content for your Website?Get unique, quality digital content for your website. You can even earn money by reselling it!Includes:
|