Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
id attribute
title tag
CORE ATTRIBUTE: style
style="stylecode"
Available in versions: 4.0
HTML 4.0 tag compatibility: All tags except
base, basefront, head, html, meta, param, script, style, title
The
style
core attribute is used to create an inline set of style rules that define the appearance and presentation of text and images for a specific element. This is a convenient method for applying the effects of Cascading Style Sheets to a select portion of an entire HTML document. As a consequence, this core attribute is extremely useful.
Do not confuse this attribute with the
style
tag which is placed in the
head
of an HTML document and can be used to assign a set of style rules that affect the entire page or any portion.
In these examples, an inline
style
script is first used to set the color of the word DevGuru, and then is used to grow the size of the letter a. Note the use of the
span
tags.
Code:
<span style="color: red;">DevGuru</span> products are great!
Output:
DevGuru
products are great!
Code:
<span style="font-size: 2px;">a</span>
<span style="font-size: 4px;">a</span>
<span style="font-size: 6px;">a</span>
<span style="font-size: 8px;">a</span>
<span style="font-size:10px;">a</span>
<span style="font-size:12px;">a</span>
<span style="font-size:14px;">a</span>
<span style="font-size:16px;">a</span>
<span style="font-size:18px;">a</span>
<span style="font-size:20px;">a</span>
<span style="font-size:22px;">a</span>
<span style="font-size:24px;">a</span>
<span style="font-size:26px;">a</span>
<span style="font-size:28px;">a</span>
<span style="font-size:30px;">a</span>
<span style="font-size:32px;">a</span>
<span style="font-size:34px;">a</span>
Output:
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information