How to add an image in HTML: Your website should be attractive and informative so that visitors get attracted to your page. The website you create not all about text and multimedia it should be enough attractive and engaging. Here HTML multimedia allows you to include the image, video clips, audio clip, and other multimedia elements. To place an image on HTML has a constant command. You just have to follow the same format every time.
How to add an image in HTML
Here we have full description and code part to add in image in HTML.
Description on commands you have to remember and follow:
- IMG: it is a command which stands for image. It informs the browser that an image will upload in this particular place. The image will pop up where you will tag this image command.
- SRC: it is a command which stands for source. This also allocates a command inside a command. This helps the browser to find the picture. You can call whatever you want to call an image just you have to place a subdir name in front of it.
- Imag.gif: this command stands for the name of the image. It follows the same type of the format that HTML documents follow. You have to place the name in this manner like first you have to put the name of the image than a dot and then you have to put a suffix like a gif.
- ALT: Thia command stands for alternate text. This command helps the browser that if it cannot find the image then they have just displayed the text. This even describes the visitors what the image is all about.
Inserting the Image:
Step 1: Uploading your image: Picasa, Imager, and Photo bucket, Web Albums are some of the free image hosting services. You have to read the terms very carefully. There are some services that take down your image if too many people see ut, or some will reduce your image quality.
- By using blog administrator tools some blog hosting services let you upload images.
- By using an FTP services upload the image to your own site you have a paid web host. Creating an ‘image’ directory is recommended so that you can keep your file organized.
- Ask the creator for permission if you want to use an image on another website. If the permission is granted, download the image then upload the image to an image hosting site.
Step 2: Open your HTML file: where image will be displayed try to open the HTML document for the web page.
- Many website use costume system instead of HTML. If you are trying to insert an image on any forum you can directly type in the post.
Step 3: you have to start with img tag:
Find the place in your HTML page where you want to insert an image. There you have to tag by writing <img>. This ia an empty tag which means that there is no closing tag and stand alone.
Just remember one thing whenever you want to display your image that will go inside the two angle brackets “<img>”.
Step 4: you have to find URL of the image: you 1st have to vist that web page where the image is hosted. Then you have to right click the image and them you have to select an option “copy image location”. The second way is you can also click on “view image” to see the picture on a page, and then you can copy the URL in your address bar.
Just remember one thing whenever you upload the image to an images directory in your website, link to it /image/yourfilename. If this way doesn’t work then the image directory is probably inside another folder. Then move it up to the root directory.
Step 5: Place the URL in a src attribute: you must know that HTML attributes goes inside a tag to modify it. This scr attribute is a source which tells the browser where to look to find the image. You just have to write a command like scr=” “ and the copy paste the image URL in between the quotation marks. Below there is an example to explain you properly:
Step 6: adding an alt attribute: Its best to add alt attribute as technically HTML has everything it needs to display the image. When image fails to load this tells the browser what text to display on screen. It helps the search engines to find out what the image is all about. It depends on the screen readers to describe the image visual impaired visitors.
Step 7: now you have to save the image changes: you have to save the HTML file to your website. If the page is already opened you have to refresh it and if it’s not open then visit the age now to see the changes.
Benefits of adding image in HTML:
- Adding images in HTML gallery not only make the page more attractive but also helps in engaging the visitors and helps in increasing the timing they spend on the page.
- When you put an attractive picture which forces the visitors to comment on the image. When you present your image in a different way like putting the picture on stylish template which helps in lots of transitions and customization options.
- HTML gallery is easy and fast to create and manage but you just have to follow some of the steps.
Above are some of the steps you have to follow to add an image in HTML. HTML is very easy but remembers that the error can be costly. HTML is easy to code and much of the HTML can be customized by the people who know the HTML very nicely. The HTML also allows the users to use templates which make the webpage easy to assess. HTML is known as Hyper-test Mark-up language. Adding image in HTML will allow the visitors to get attracted and spend time in scrolling down on the web page. This will allow traffic of people to get attracted to your website and enjoy the facilities of adding an image in HTML.
To get more information about How to add an image in HTML visit our official website.