• In HTML document we can use different fonts and lists.
  • For look more attractive we can add more graphics to make the document.
  • Web browsers support a number of graphic formats, there are three types of formats widely used they are Graphics Interchange Format (GIF), Joint Photographic Expert Group (JPEG), Portable Network Graphics (PNG).
  • Graphics Interchange Format (GIF) is the best format displaying images designed with a graphics program.
  • Joint Photographic Expert Group (JPEG) is the best format for photographs.
  • Portable Network Graphics (PNG) is the best format for images with transparency or the low color count.
  • In HTML document <img> tag specifies an image to be displayed.

Inserting an image with CSS

Sample Code

<!DOCTYPE html>
<html>
<style>
image{border:4px solid orange; width: 120px;height: 100px;}
h1{text-transform:uppercase}
</style>
<head>
<title>
HTML frame scrolling Attribute
</title>
</head>
<body>
<h1>Inserting Image</h1>
<img src="wikitechy.png" alt="image is not available">
</body>
</html>

Output

Inserting an Image without the CSS

Sample Code

<!DOCTYPE html>
<head>
<title>
HTML frame scrolling Attribute
</title>
</head>
<body>
<h1>Inserting Image</h1>
<img src="wikitechy.png" alt="image is not available" width="120px" height="100px">
</body>
</html>

Output

 

Categorized in: