Chemistry, asked by KANAVAMPS, 1 year ago

how will you add an image to your web page

Answers

Answered by dvipada07
0

Web pages are capable of far more than text, and if you build your web page with HTML5, you can add images in a variety of file types, including .jpg, .gif, and .png. The figure shows a web page with an embedded image; the code that follows shows you the page’s code.

Identify the image you want to use.

Be sure you have permission to use the image on your site.

Modify the image if necessary.

It’s best to resize your images before you use them on the web. You can use commercial image-manipulation software or free programs such as IrfanView and Gimp.

Choose your image type.

If your image is in a format other than web-friendly .jpg, .gif, or .png, use a tool like IrfanView or Gimp to change it to one of these formats.

Put your image in the right place.

Put your image file in the same directory as the HTML file. That way, when you post your page to the server, you can move the image as well.

Build your page as normal.

The image will be placed with a tag embedded into the body.

Use the <img> tag to indicate the image.

Embed this tag inside a <p></p> (paragraph) or <div></div> (division) pair so that the page validates correctly.

Use the src attribute to indicate the file containing the image.

If the image file is in the same directory as the web page, all you need is the name of the image. If the image file is elsewhere on the Internet, you can use a complete URL.

Include an alt attribute that describes the image.

An alt tag is important for visitors who cannot see your image — users with visual impairments, people who have turned off images to increase browsing speed, and search engine bots, which can’t see the images but read alt tags.

End the image tag with a /.

The img tag is a special one-shot tag that doesn’t require (or allow) an end tag. The slash character at the end of the tag indicates this.


dvipada07: mark me the brainliest
Similar questions