Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Structure the Image Gallery

hi please let me know how can i import the images to a notepad as i am trying all the html commands in a notepad

hi please let me know how can i import the images to a notepad as i am trying all the html commands in a notepad

3 Answers

Bill Hinostroza
Bill Hinostroza
19,273 Points

if you want to display an image in your html file you use the following tag.

<img src="Path of your image">
``
Juan Arriagada
Juan Arriagada
2,950 Points

You can't import images to a notepad becouse it only supports plain text. As you're working with HTML, an easy way to access the image you want to use in your Web Page is to place the image file in the same (Windows, Mac, Linux) Folder in which you saved your HTML Web Page.

Something like this:

c:/>image_file.jpg
c:/>my_web.html

or:

/home/your_user/html_place/image_file.jpg
/home/your_user/html_place/my_web.html

Then your HTML tag, as Bill said before, you can use:

<img src="image_file.jpg" />

Try not to use OS specific path, for example:

<img src="c:/image_file.jpg" />

It would work on your development machine but it would not work when you upload it to the Internet.

You can also use an image from Internet (http://upload.wikimedia.org/wikipedia/commons/thumb/6/61/HTML5_logo_and_wordmark.svg/2000px-HTML5_logo_and_wordmark.svg.png)

<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/61/HTML5_logo_and_wordmark.svg/2000px-HTML5_logo_and_wordmark.svg.png" />

For more information on how to use the image tag, you can use the W3C reference:

http://www.w3schools.com/html/html_images.asp

Best regards,

Thanks Juan and Bill