Sunday, November 3, 2024

HTML Image

 

Basic Syntax for an HTML Image

1. Basic Example: Adding an Image

<html> <head> <body> <title> image </title> </head> <img src="file:///C:/Users/ACER/Desktop/students/kiran/1%20001.jpg"> </body> </html>

2. Setting Image Dimensions (Width and Height)

Example:

<html> <head> <body> <title> image </title> </head> <img src="file:///C:/Users/ACER/Desktop/students/kiran/1%20001.jpg" hight=200 width=200> </body> </html>

3. Using Images as Links

You can make an image clickable by wrapping it with an <a> (anchor) tag.

<html>

<head>

<body>

<title> image </title> </head>

<a href="file:///C:/Users/ACER/Desktop/students/kiran/1%20001.jpg">

<img src="file:///C:/Users/ACER/Desktop/students/kiran/1%20001.jpg" width=20 hight=20></a>

</body>

</html>



No comments:

Post a Comment

All India Sainik Schools Entrance Exam 2025

  https://aissee2025.ntaonline.in/ National Testing Agency (NTA) NTA All India Sainik Schools Entrance Exam (AISSEE 2025) AISSEE 2025 Admiss...