HTML Attributes
Attributes provide additional information
about HTML elements.
HTML Attributes
- HTML elements can have attributes
- Attributes provide additional information
about the element
- Attributes are always specified in the start tag
- Attributes come in name/value pairs like: name="value"
Attribute Example
HTML links are defined with the <a> tag. The link address is provided
as an attribute:
(You will learn about links in a later chapter of this tutorial)
Always Quote Attribute Values
Attribute values should always be enclosed in quotes.
Double style quotes are the most common,
but single style quotes are also allowed.
In some rare situations, like when the attribute value itself contains
quotes, it is necessary to use single quotes:
name='John "ShotGun" Nelson'
HTML Tip: Use Lowercase Attributes
Attribute names and attribute values are case-insensitive.
However, the World Wide Web Consortium (W3C) recommends lowercase
attributes/attribute values in
their HTML 4 recommendation
Newer versions of (X)HTML will demand
lowercase attributes.
HTML Attributes Reference
A full list of legal attributes for each HTML element is listed in our:
Complete HTML Reference
Below is a list of some attributes that are standard for most HTML elements:
| Attribute |
Value |
Description |
| class |
class_rule or style_rule |
The class of the element |
| id |
id_name |
A unique id for the element |
| style |
style_definition |
An inline style definition
|
| title |
tooltip_text |
A text to display in a tool tip
|
For more information about standard attributes:
HTML Standard Attributes Reference
Make your web applications look like a million bucks
|
|
Most web applications today use boring methods to present data to their viewers using grids or simple HTML tables. FusionCharts induces "life" into the web applications by converting monotonous data into lively charts, gauges & maps.
FusionCharts works with all technologies like ASP, ASP.NET, PHP, ColdFusion, Ruby on Rails, JSP, HTML pages etc.
and connects to any database to render animated & interactive charts. It takes less than 15 minutes and no expertise
whatsoever to build your first chart and just a glance of it to captivate your audience. This fact is endorsed by our
12,000 customers and 150,000 users which include a majority of the Fortune 500 companies.
And yeah, your applications could look like a million bucks by spending just $69.
So go ahead, download your
copy of FusionCharts and start "wow-ing" your customers now!
|
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4000 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|