HTML: Detail of Attributes


Attributes provide additional information about HTML elements.HTML Attributes is an associated property of an HTML element used to extend the capability of an HTML element for example bgcolor is one type of attributes and it is used in body tag,the following some attributes display in table.

  • Attributes usually come in name/value pairs like: name=”value”.
  • All HTML elements can have attributes.
  • Attributes provide additional information about an element.
  • Attributes are always specified in the start tag.

HTML values of the attributes may be wrapped by double quotes,which is not mandatory.HTML attributes nae are sensitive but value is not case sensitive.

href attributes:

href attribute is used for provide a link in the text for providing a better knowledge about that text.

<a href=””> Title of that text </a>

src attributes:

In HTML image are defined with <img> tag.But for showing the image in the webpage we need to provide source of the image.

For example:

<img src=”file name with format name like .png”>

id attributes:

The id attribute are used to set Unique id for an element.

example: <div id=”worldtechnique”>

The width and height Attributes:

Images in HTML have a set of size attributes, which specifies the width and height of the image:

For example: <img src=”img_girl.jpg” width=”500″ height=”600″>

The image size is specified in pixels: width=”500″ means 500 pixels wide.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

Back to top button
Join Tizen Group