HTML attributes

Sabtu, 24 Desember 2011

Having previously we learn about HTML tags we now try to look at other extra capabilities HTML tags. This additional capability is obtained through the use  HTML tag attributes. Attribute allows additional information on HTML elements.

HTML Tag Attributes

HTML tags can have attributes. Attribute allows additional information on HTML elements.
Attributes always have a name / value pairs like this: name = "value".
Attributes are always specified at the beginning of an HTML element tags.

Example Attribute 1:

<h1> defining beginning of a title.
<h1 align="center"> have additional information about alignment line.

Example Attribute  2:

<body> defining body / content of an HTML page kit.
<body bgcolor="red"> will make the screen a red background.

Example Attribute  3:
<table> defining an HTML table (we later learn more).
<table border="1"> has additional information about the thickness of the lines on the chart.

Always use quotes in Attribute Value

Attribute value should always be enclosed in quotation marks. Double quotes most often used, but also single quotes actually be ko.

In some situations tertantu extremely rare, such as for example when the attribute value itself contains quotes, then you can use single quotes.

Examples like this:

name = 'world' learning HTML 'virtual'

Ok.
Good luck with the HTML tag attributes.

1 komentar:

Jyotidairatek mengatakan...

Nice article!!! If you are still looking for the services of web design near you? Then we are here to help you. We are one of the leading web design and development company in your area that offers you the best and most reliable services.

Posting Komentar

 
© Copyright 2010-2011 web design Web Design.
learning HTML Learning PHP | Published by create PHP | Sport News Blogger.com.