Hello Welcome back to My Blog, in yesterday’s post we discussed the material about How to Create Links in HTML. Well in this article we will discuss, Learn HTML | Image in HTML and IFRAME. image and Iframe is important in HTML to display images and display web pages that are called using iframes.
Well we will remember briefly about Hyperlink:
Hyperlink is connecting one document to another document in HTML. The purpose of this hyperlink is to create a text or image which when clicked will be redirected to a specific page that has been assigned to the hyperlinks.
Insert Image in HTML
To display images in this HTML we will use the command :
minimal command is :
<img src="nameimage.jpg" alt="description">
Or if you use other syntax examples then like this
<img src="imagename.jpg" style="cursor: move;" height="200" width="400" alt="description"/>
So the explanation above is:
- img means for images, image
- src stands for source which means source, is
- src or where the file is located
- Height and Width to set the height and width of the image.
If you want the image to be in a folder, the script looks like this:
<img src="folder/namagambar.jpg" height="200" width="400" alt="description"/>
The use of alt in images is very helpful for SEO on our website.
IFRAME in HTML
Using an iframe, maybe it can be needed on a website. Its use is very easy, just call the iframe tag in the html. It used to be able to use but when it was used in html5 it didn’t work. and therefore we’re going to use an Iframe.
Using an iframe, maybe it can be needed on a website. iframe can be used to display other website pages in a website. Yes, you could say the website on the website.
The following is an example of an Iframe script
<iframe src="https://www.awonapa.com" height="400" width="400" />