+ 2
How to add a image?
I want add a image. In my HTML code. How I can do it
5 Answers
+ 2
Images
https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML
audio:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
video:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
How To Upload your phone images on SoloLearn using phone
https://code.sololearn.com/WT3661NHpV3B/?ref=app
Upload content with Dropbox [Tutorial]
https://code.sololearn.com/WW6t4B73kJVz/?ref=app
How to host/upload an image (IMGBB way)
/by Farhanaz/
https://code.sololearn.com/Wy3lrXNwGsgJ/?ref=app
Upload content with Google drive
https://code.sololearn.com/Wa25A17a19a1/?ref=app
0
There are 2 ways
Its by the url source or filepath
Url
<img src="http://url of the image.com" 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
0
<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
0
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.