CMS

Content

HTML

Images

Monetizing

Home » Images

Inserting Images Into Your Web Pages

Monday, 22 March 2010 · Print This Post Print This Post 6 Comments

Related Reading

This entry is part 2 of 7 in the series Images

If you wish to add an image to a spot on your HTML document, you can simply use the <img> tag. The general usage includes the “src” attribute to indicate the source file (i.e. location and filename of the image you want to use).

Save the below image to the same location as your HTML page, and then copy & paste the code to get a feel of what I mean:

Right Click On This Image And Select 'Save Picture As...'

Copy & paste the below code after you save the above image to the same location as you’ll save your sample web page:

<html>
<head>

</head>
<body>

<img src=”image.jpg”>

</body>
</html>

Note that you do not need to close the <img> tag by using a </img> tag. Now save your HTML document as .htm or .html and double-click it – you should see a web page with the above image inside:

If you enjoyed this lesson, please link to it :)

Lesson 1-07-02, which is the next subsection of Lesson 1-07, is going to teach you how to add an “alternative text” to your images. This way…

Series Navigation«ImagesAdding Alternative Text To Your Images»

Bookmark this Post Subscribe to Blog

Popular Tags

Adsense Background Cascading Style Sheets colors Content font Forms GIF Hex Codes HTML Hyperlinking Images IMeye JavaScript JPEG Keyword Research layout Merging meta PNG SEO Sizing spacer Tables text W3C
Comments
  • dear sir
    I tried many ways the above program. but i could not succeed. in place of horse image, i see a square and a red dot inside. can u tell me where i went wrong? i will be highly thankful for your help. thanks in advance.
    abdulla

  • admin

    what is the URL where you are trying to make the image work please Abdulla?

  • abdulla

    Dear sir,
    iam lost, i don’t see any comment in your reply.
    I tried other images also, but unsuccessful. i tried to save the image with default file name/with extensions. all not working. just what i see is a red X mark inside a square. i don’t know any additional praogram required in my computer..

  • admin

    Abdulla,

    Please upload what you have done to a website you own so we can see the error you are making.

  • abdulla

    Dear sir,
    thank u for u’r kind reply. we have a web site (created in front page) but Iam not managing that site. Now I have to manage that site. Iam only a beginer with no experience in web designing. first I want to start with html, to get some basic and become familiar with technical web terms, after that i may go for some template. now what iam doing is just following the instructions in your lessons. if you tell me step by step how to save the image, i think that will be enough.
    I find problem in e-mail also. when i receive pic in email I see blank space only. is it necessary to install any additional programs in my computer for this?

    I highly appreciate your kind reply.
    thank you again
    abdulla.

  • admin

    Saving the image to your harddrive is simple… or at least I think that is what you are asking.

    Put your mouse over the image, right click.

    In the box that opens select ‘”Save image as….”

    Select where you want to save it on your harddrive.

Leave a Comment

Threaded commenting powered by Spectacu.la code.