answersLogoWhite

0

HTML for inserting an image

Updated: 8/9/2023
User Avatar

Wiki User

12y ago

Best Answer

You use the img tag and specify a location with the src attribute:

<img src ="(location of your picture)"/>

So if you have a file called MyPicture.jpg in a local folder called Pictures, your code could be like this:

<img src="Pictures/MyPicture.jpg">

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

The IMAGE tag in HTML is used to show a picture on a web page. The example below will show the basics on how to make this happen.

Basically you enter the URL of the picture where it says URL below. If you add an alt tag it will display those words if you place the cursor over the picture. The last line is how you would add a background image.

<img src="URL" />

<img src="smasher.gif" alt="This is Smasher!" />

<body background="background.jpg">

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

To add an image to a HTML document you use the <img> tag.

Example: <img src="html5.png" alt="HTML5 Icon" width="200" height="200">

You can also specify the image dimensions using inline styles.

Example: <img src="html5.png" alt="HTML5 Icon" style="width:200px;height:200px;">

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

Let's say you have an image called Denmark-flag.jpg that you were wanting to insert into your web page. You would use the following HTML code:

<img src="denmark-flag.jpg" alt="In the sky flies a red flag with a white cross whose vertical bar is shifted toward the flagpole" width="640" height="348">

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

<image src="<path_to_your_image>" class="<some_class_if_you_want_it>" id="<a_unique_id>" alt="<some_text_you_want_to_show_if_the_pic_is_unavailable>"/>

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: HTML for inserting an image
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where could one find a tutorial for inserting an image using HTML?

One can find a tutorial for inserting an image using HTML on a variety of online sources. Such sources include PageTutor, HTML, MyHTMLTutorials, and TheSiteWizard.


What is the correct HTML for inserting a background image?

< body background = " background.gif">


What is coding for inserting Image in HTMl language?

In HTML: &lt;img src="path/to/image.jpg" alt="Desc. of the Image"&gt; In XHTML: &lt;img src="path/to/image.jpg" alt="Desc. of the Image" /&gt;


What is the correct HTML tag for inserting a line brake?

&lt;BR&gt;


What will be the HTML syntax of the image after copying it to a CD?

An image does not have an HTML syntax. If you copy an image from a Webpage, you save just the image file (e.g. image.jpg). You do not save any of the HTML code used to tell the browser where to locate the image to display on the page.


What is the correct HTML tag for a inserting a line break?

&lt;br&gt;


What is inserting a line break for HTML?

Inserting a line break would be just adding the following to the part where you want to break your line:


How do you use images in HTML?

HTML has a markup tag to tell the browser where to find an image for viewing. If the image is not in the same directory as your HTML file, you need to give the browser enough information to locate the image. Here is an example of HTML code to display an image: &lt;img src="image.jpg" width="100" height="100" alt="My Image" /&gt;.


How To Embed Images In Text?

You can embed an image in HTML via IMAGE tag. It can be written as &lt;img src="image-source"/&gt;


How do you upload an image to a HTML document?

To put an image in an HTML document, first upload the image to a web server somewhere. Then, copy the URL of the document. Finally, place the following code into the HTML document: &lt;image src="PASTE URL HERE" /&gt;


How do you display an image on the homepage only using CSS or HTML?

HTML only can be used to display an image on homepage. Image SRC tag can be used to publish it.


Is a embedded image a part of the HTML file?

Images cannot be stored in the actual HTML file itself. HTML is always stored in a text file. Text files cannot store images. What will be in it is a reference to the image which enables the page to show the image, by looking to its location. When you open the HTML file in a browser, it will show the image.