html and imagesQ. how do i put pictures on my pageyou have to make sure that the picture is a .jpg or .gifif the picture you want to use is a .bmp bitmap then you must use your graphics/paint program to save it as a .gif or .jpg, this is because .bmp file sizes are so large and therefore take much longer to download, .jpg and .gif file formats are generally a much smaller file size and .jpg files can be compressed to upto 72 dpi photo quality images are usually saved as a .jpg and .gif files are more suitable for animations to make the picture show up on your page use the image source tag <img src="picture.gif"> the picture will default to the left of your page if you want to center it use the align attribute <img align="center" src="picture.gif"> you can also use align="left" or align="right" use height and width attributespages will load faster if you tell the browser the size dimensionshave you ever seen those pages where the content of the document jump around? the reason that happens is that the users browser is trying to draw the page without knowing the size of the image, once the image has loaded, the computer redraws the page and everything is seen to jump and this repeats again and again until the page has fully loaded <img height="90" width="120" picture.gif"> you can play around with the height and width attributes <img height="100" width="300" picture.gif"> <img height="100" width="100" picture.gif"> use alt textadd the alt attribute so that when a user hovers their cursor over an image an alternative text message pops up <img "picture.gif" alt="picture of a bridge" >try it how do i use a picture as a linkmake sure you read and understood the page about links, its just a combination of what has already been talked about on this page, we just wrap the hyper reference around the image tag like so..<a href="index.html"><img src="picture.gif"></a> Try it image problemsusually the easiest way around image problems is to include the full url (absolute url) of the image<img src="http://www.someserver.com/username/picture.gif"> probably the most common problem with images is case sensetivity THIS IS UPPER CASE this is lower case MiXInG cAse caUSEs prObLEms - especially on unix systems so make it a habit to use lower case and avoid the temptation of begining each filename with capitals home html tutorial css tutorial javascript webmaster articles link exchange |
html tutorial make money from your website |