top of page
  • Facebook
  • Twitter
  • Instagram

HTML Notes

mobiprep (6).png

HTML

mobiprep (6).png

HTML Tags and Elements

mobiprep (6).png

Attributes and Hyperlinks

mobiprep (6).png

Headings and Lists

mobiprep (6).png

Class and id attributes

mobiprep (6).png

Semantic Elements

mobiprep (6).png

Inline and Block-Level Elements

mobiprep (6).png

Div and Span

mobiprep (6).png

img

mobiprep (6).png

Tables

mobiprep (6).png

Forms

Heading

Q

1

What attributes can be used with <img> tag?

LRM_EXPORT_207556595493866_20190724_1939

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

LRM_EXPORT_207556595493866_20190724_1939

Q

2

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

LRM_EXPORT_207556595493866_20190724_1939

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.

LRM_EXPORT_207556595493866_20190724_1939

Q

3

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

LRM_EXPORT_207556595493866_20190724_1939

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.

LRM_EXPORT_207556595493866_20190724_1939

Q

4

How can images be used as Hyperlinks?

LRM_EXPORT_207556595493866_20190724_1939

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>

LRM_EXPORT_207556595493866_20190724_1939

Q

5

Define image maps.

LRM_EXPORT_207556595493866_20190724_1939

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.

LRM_EXPORT_207556595493866_20190724_1939
bottom of page