HTML Notes
.png)
HTML
.png)
HTML Tags and Elements
.png)
Attributes and Hyperlinks
.png)
Headings and Lists
.png)
Class and id attributes
.png)
Semantic Elements
.png)
Inline and Block-Level Elements
.png)
Div and Span
.png)
img
.png)
Tables
.png)
Forms
Heading
Q
1
What attributes can be used with <img> tag?

Ans
When you use <img> tag in HTML. The SRC part is called an attribute. There are lots of other attributes you can add to the IMG tag.
Here are the image attributes in HTML 5:
ALT
SRC
HEIGHT
WIDTH
USEMAP
ISMAP

Q
2
Which HTML tag is used to insert images in a webpage? Explain it in detail. (img tag)

Ans
HTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains attributes only, closing tags are not used in HTML image element.

Q
3
Mention the purpose of alt attribute in <img> tag.

Ans
The required alt attribute specifies an alternate text for an image, if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot veiw it.

Q
4
How can images be used as Hyperlinks?

Ans
Creating an Image Link is almost the same as creating a text Link. You can create an Image Link by substitute an image tag in the place of the link text.
Consider the above text link and we are going to replace the link text
<a href=”url”><img src=”demo.png” alt=”image-as-a-link”/></a>

Q
5
Define image maps.

Ans
The HTML <map> tag defines an image map. An image map is an image with clickable areas. The areas are defined with one or more <area> tags.
