iDeskBD Forum
Please Give your Log In information.

HTML Attributes

View previous topic View next topic Go down

HTML Attributes

Post by Admin on Fri Aug 13, 2010 1:10 am

HTML tags can contain one or more attributes. Attributes
are added to a tag to provide the browser with more information about
how the tag should appear or behave. Attributes consist of a name and a value separated by an equals (=) sign.

Example


Consider this example:

Code:
<body [b]style="background-color:orange"[/b]>
OK, we've already seen the body tag in previous lessons, but this time
we can see that something extra has been added to the tag - an
attribute. This particular attribute statement, style="background-color:orange", tells the browser to style the body element with a background color of orange.
The browser knows to make the background color orange because we are
using standard HTML tags and attributes (along with standard Cascading
Style Sheets code) for setting the color.
Another Example


Here's another example of adding an attribute to an HTML tag. In this example, we use the <a> tag to create a hyperlink to the Quackit website.
Code:
<a [b]href="http://www.captcha.live.com.bd"[/b]>Captcha.Live</a>
This results in:
Captcha.Live
avatar
Admin
Admin

Posts : 40
Points : 110
Reputation : 7
Join date : 2009-11-21
Age : 31
Location : Dhaka

View user profile http://www.smartbdtech.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum