Attributes in HTML

So hello friends here we are going to learn about Attributes in HTML. Attributes are used set the property or characteristics of your HTML element. You can set alignment, colour, fontsize, height, width or you can add inline CSS in it also by style attribute .
Attributes are used to set the characteristics of element . So let's see some useful attributes . These are usable with many of HTML tags .
Attributes Value Description
       id                                                               User defined To give the name for an element and for use with CSS.
      

      class


 User defined Name the element and used for CSS.
       aligntop,center,left To set alignment of element to left,top or center.

     
    bgcolor 


rgb values, numeric, hexadecimal To give the background colour to the element.
 
 background


       URL() Add image in the background  of element.
     

      title


 User defined It pop up the title of the element.
      height     numericTo define the height of images,table cells and tables.
       width    numericTo specify the width of images and tables.

Here you can see unique attributes which are used in many elements. 


This will result as follow:








Here are some other posts

Form in HTML

Ordered and unordered lists in HTML

Basics of html

How to become a web developer

Tables in HTML

Ids and Classes in HTML

Images and links in HTML