Recent Posts

Tuesday 9 January 2018

What is Image tag in HTML

In the previous post we learn about How to add hyper link in html.In this post we will learn what is <IMG> image tag and attributes of image tag.Html is a web based programing language in which we can create web page and web applications and in web page we can add images so images can be added in web page by using <IMG> image tag.

points that covered in this topic are:

  1. what is <IMG> image tag.
  2. types of <IMG> image tag.

1.what is image tag:

The purpose of the image tag is use to insert image in HTML.The Html image tag is use to put an image in Html document.The purpose of the image tag is to include graphic images in the body of html document.The alt attribute is the alternative description of image tag.The image tag <IMG> has no closing tag.The src attribute specifies the address of the image.

You can insert any image in your html document by using <img> image tag.Following is the syntax of <img> image tag.

Syntax:
<img src="image URL".....attribute-list>

In the above syntax at the place of image URL we have to write address of the image.

2.Types of image tag:

1.Inline image:
Images are sometime referred to as inline images because the images are inserted within a line of text.If the image is a large one, then the line becomes very tall, and a lot of white space will appear.

2.Floating image:
Floating images cause text to wrap around the image.Image can either be left aligned or right aligned.The paragraph will flow around the image for several lines, if the image is large.If we have an image in the same directory as our html file then we don't have to provide a path of image file and tag can be written as follow:

<IMG SRC="mobile.jpg">

If the image is present in another directory then tag can be written as follow:
<IMG SRC="c:\images\mobile.jpg">

The above tag will insert image mobile.jpg in the Html web page.In the next post i will tell you about How to insert image in HTML.

0 comments:

Post a Comment

Followers

Popular Posts

Categories

social media

Text Widget

Powered by Blogger.

About Me

My name is junaid khan and i am a full time blogger and author of a blog tutorial called tutorialpointsolution.

String function

In the previous post we learn about what is String .we know that string is a collection of two or more characters.In string we can store al...

Search This Blog

Technology

Adbox

Recent Post

Breaking

Recent In Internet

Comments

Facebook

Pages

Comments

Pages

Recent

Pages

Technology