0% found this document useful (0 votes)
12 views

HTML Attributes

Uploaded by

Kushagra Katiha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

HTML Attributes

Uploaded by

Kushagra Katiha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

HTML Attributes

HTML Attributes :-
They provide additional information
about the HTML element.
~ Has to be specified in start tag.
~ Comes as name/value pairs like:
name= “value”

Example:-
Src attribute :-
Used with <img> (no end
tag) element, src specifies
the path where the image
to be shown is placed.

Example-
Width and height attributes :-
Used with <img> element, width defines
the width and height defines the height of
the image.

Example:-

Alt attribute :-
Used with <img>, alt defines alternate text for image if it
fails to load due to some error.

Example:-
Style attribute :-
Can be used in any tag to style
it.

Example-
Title attribute :-
Can be used in any element, it
gives some extra information about a
element.
The value of this attribute will be
displayed as a tooltip when you mouse
over the element.

Example-
Lang attribute :-
Used in <html> </html>
element. Lang declares the
language of Web page. This is
meant to assist search engines
and browsers.

Example-

You might also like