- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Insert an Image in HTML Page?
Images can be easily inserted at any section in an HTML page. To insert image in an HTML page, use the <img> tags. It is an empty tag, containing only attributes since the closing tag is not required.
Just keep in mind that you should use the <img> tag inside <body>…</body> tag. The src attribute is used to add the image source i.e. URL of the image. The alt attribute is for adding alternate text, width for adding width, and height for adding the height of the image.
You can try the following code to insert an image in an HTML page −
<!DOCTYPE html> <html> <head> <title>HTML img Tag</title> </head> <body> <img src="https://www.tutorialspoint.com/html/images/test.png" alt="Simply Easy Learning" width="200" height="80"> </body> </html>
- How to use an animated image in HTML page?
- How to Insert Hyperlink in HTML Page?
- How to use floating image in HTML page?
- How to redirect from an HTML page?
- How to use image height and width attribute in HTML Page?
- How to display an image in HTML?
- How to insert an image in a Tkinter canvas item?
- How to make page links in HTML Page?
- How to make an image responsive in HTML?
- How to insert an image in to Oracle database using Java program?
- How to insert an image in to MySQL database using Java program?
- How to use Meta Tag to redirect an HTML page?