This Blog is for HTML Tutorials.

HTML Logo

HTML Attributes

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.
  •  
     
  Summary
  • All HTML elements can have attributes
  • The href attribute provides address information for links
  • The width and height attributes provide size information for images
  • The alt attribute provides text for screen readers
     

HTML-Attributes


Post a Comment

0 Comments