An HTML attribute
provides additional information about an HTML element.
Like: name="value”
Here are Some Examples –
hrefattribute: It defines with the<a>tag & the link address is specified in it.srcattribute: It defines with the<img>tag & the filename of the image source is specified in it.width&heightattributes: It defines the width and height of the image.altattribute: It defines an alternative text to be used, if an image cannot be displayed.styleattribute: It defines the styling of an element, like color/colours, font, size etc.langattribute: It defines the language of the document can be declared in the<html>tag.alignattribute: 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
widthandheightattributes provide size information for images - The
altattribute provides text for screen readers



0 Comments