iDeskBD Forum
Please Give your Log In information.

HTML Attributes

Go down

HTML Attributes Empty 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.


Consider this example:

<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.
<a [b]href=""[/b]>Captcha.Live</a>
This results in:

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

View user profile

Back to top Go down

Back to top

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