How to add a image? | Sololearn: Learn to code for FREE!


How to add a image?

I want add a image. In my HTML code. How I can do it

8/13/2022 5:44:29 PM

Shihavul Islam

5 Answers

New Answer


<img src="url_to_your_image">


Images audio: video: How To Upload your phone images on SoloLearn using phone Upload content with Dropbox [Tutorial] How to host/upload an image (IMGBB way) /by Farhanaz/ Upload content with Google drive


There are 2 ways Its by the url source or filepath Url <img src="http://url of the" alt="image description"> Filepath from computer directory <img src="user/image/imagesampleq.png" alt="image desc"> Background for body <body style="background-image:url ("filepathe or url")"> goodluck Watch more videos


<img src=imagename alt=name/> image is one of the tags in html that is having only opening tag We can set background of a page as image Background of a table frame as image Here are some of the format png - Portable Network Graphics gif - Graphic Interface Files jpg - Joint Photography Expert Group


if you want to add an image that is saved on your device into your html code you’d add this line of code: <img src=“example.jpg” alt=“image desc”/> or if you are adding an image from the web into your html code, insert the url of the image instead of a file name. <img> is the tag to insert an image into html code. there is no need for a closing tag. src stands for source code and is an attribute to specify a url for an external file or resource (ex. images saved on your pc, url that will direct you to an image on the web, etc.) alt is for alternate text. if, for any reason, your image does not load properly it will instead display text you placed to describe the missing image. if the image displays then the alt text you provided will not display as it is not needed. including the alt attribute in your code is not necessary, but it is useful.