Search unanswered questions...
Enter a question here...
Questions Reference

What is the HTML code for a picture?

[Edit]

HTML Code for Images


[image_source]
src is short for 'source.' If your image was in a directory called 'images' with a filename of screenshot.jpg, you would replace [image_location] with images/screenshot.jpg

[hover_text]
This is an optional attribute that displays text when a user puts his or her cursor over the image.

[alternate_text]
This is also optional. If a user has images turned of through their web browser settings, this text is what shows up in place of the image.

So when it's all said and done, it should look like this (remove the spaces before "img" and after the "/"):

< img src="[image_source]" title="[hover_text]" alt="[alternate_text]" / >

Height and width attributes are also available for images, but it's best not to use them, as that will force the image to be a certain size, which can lead to distortion of the image. If you need an image to be a certain size, best practice is to edit the image directly in an image editing program (Photoshop, The Gimp, etc.) if you are able to do so.

Improve Answer Discuss the question "What is the HTML code for a picture?" Watch Question

First answer by ID1039655060. Last edit by TBBucs. Contributor trust: 16 [recommend contributor]. Question popularity: 99 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Internet > Web Design and Publishing > What is the HTML code for a picture?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Html code editor?  Picture link code?  Html code picture?  Html of a picture?  Picture html codes?  Html picture codes?  Code a photo in html?  Convert jpeg to video?  Html Picture link code?  Html picture resolution?  How do put a graphic in HTML code?  How do you put a picture into HTML?  How do you add a picture using html?  How do you get the HTML from a picture?  How do you find the html for a picture?  How do you put the picture with the HTML?  How do you put a graphic using html code?  How do you put a picture in an email html?  What is the HTML code for adding a picture?  What is the css code for posting a picture?