An HTML attribute
provides additional information about an HTML element.
Like: name="value”
Here are Some Examples –
href
attribute: It defines with the<a>
tag & the link address is specified in it.src
attribute: It defines with the<img>
tag & the filename of the image source is specified in it.width
&height
attributes: It defines the width and height of the image.alt
attribute: It defines an alternative text to be used, if an image cannot be displayed.style
attribute: It defines the styling of an element, like color/colours, font, size etc.lang
attribute: It defines the language of the document can be declared in the<html>
tag.align
attribute: It generally used to align the data in our HTML page. We can align image or text in three ways and they are right,left and center.
- All HTML elements can have attributes
- The
attribute provides address information for linkshref
- The
width
andheight
attributes provide size information for images - The
alt
attribute provides text for screen readers
0 Comments