hellooooo friends can anyone help me out? i am in total mess! newbie to html, learning this n got confused with images. problem: how can i insert images which are in my computer or elsewhere into the page?
hi i am using notepad as my editor. if u can suggest me with any editor with which i can do my intended function that will also do thanx
stick with notepad to keep learning, using automated editors you'll learn nothing. to insert an image, simply add the following code <img src="path to the image"> Code (markup): For future reference, find out anything you need about coding from http://w3schools.com
if the images are in your comp then u can open the html file and it'll work too, they don't have to be uploaded to the server to test them.
Also to some of the answers I use " border="0" so the image won't include the thick blue outline.. this will distort the original image. so.. <img src="http://????.com" border="0"> Good luck!
No, Brett, he's right-- many of the default stylesheets on browsers make a border around images, link or not. Instead of sticking it in the HTML though, it should be in the CSS, next to the reset. stuff... img { border: 0; } Otherwise every single image has to have that extra code... waste of typing : )
And Image should also have always have an ALT attribute. Here is a step by step guide on inserting an image, plus some basic styling. 1. Create a new file in notepad and add into it: img{border:none} Code (markup): 2. Save that file as screen.css. 3. In your HTML document you should have <head> and </head>. Anywhere in between them add: <link rel="stylesheet" type="text/css" media="screen,projection" type="text/css"> Code (markup): . 4. Then between your body tags add this: <img src="path/to/image.png" alt="Alternate text"> Code (markup): What is alternate text? If for some reason your image does not work - that text will display instead - it is a necessity in modern coding standards. In the end your HTML should look something like this: <html> <head> <link rel="stylesheet" type="text/css" media="screen,projection" type="text/css"> <title>Page Title</title> </head> <body> <img src="path/to/image.png" alt="Alternate text"> </body> </html> Code (markup):
hello friends i had tried with the syntax <img src="--------" alt="-------------"> with the above syntax i am not able to view my images i had saved all my images in a separate folder if any one can be more specific with the solution will be really helpful
I think you're not typing the file path right. Lots of people have trouble with this one... your HTML should be good. The image won't show up though if it's not where the path says. Try sticking your images in the SAME FOLDER as the html and css files... that way, you can try <img src="nameoffile.gif" alt="etc"> and check to see if you see them.
hello friends i got the fix for the problem guys the pro is with the extensions (jpeg-jpg) i thought both as same but both r unique friends try n find the difference. thanx everyone for the kind help
the difference between jpg and jpeg is the letter 'e' both formats are identical, but you could name your file image.dlkt and as long at that's what you reference in your code, that's the file that will be placed there. from now on, I'd try to ame your JPEG's .jpg as it's the proper extension for JFIF images. JPEG means Joint Photographic Experts Group, and the file format they created was JPEG File Interchange Format.