HTMLforall

  HTML | PHP | Forum

HTML <style> tag

Syntax

<style> - </style>

Definition and Usage

The STYLE element defines a style or a style sheet in a document.

The STYLE element goes in the head section. If you want to include a style sheet in your page, you should define the style sheet externally, and link to it using <link>.

Required Attributes

Attribute Value Description
type text/css Defines the content-type

Optional Attributes

Attribute Value Description
media screen
tty
tv
projection
handheld
print
braille
aural
all
The destination medium for the style information

Standard Attributes

title, dir, lang, xml:space

For a full description, go to Standard Attributes.

Example

Source Output
<style fprolloverstyle>A:hover { text-decoration: overline; font-weight: bold}
</style>
 

Home

Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

Top-Level Elements
<!--...-->
<!DOCTYPE> 
<html>
<head>
<body>
<frameset>
Head Elements
<base>
<isindex>
<link>
<meta>
<script>
<style>
<title>
Generic Block-level Elements
<address>
<blockquote>
<center>
<del>
<div>
<h1> to <h6>
<hr>
<ins>
<isindex>
<noscript>
<p>
<pre>
Lists
<dd>
<dir>
<dl>
<dt>
<li>
<menu>
<ol>
<ul>
Tables
<caption>
<col>
<colgroup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<tr>
Forms
<button>
<fieldset>
<form>
<input>
<label>
<legend>
<option>
<optgroup>
<select>
<textarea>
Special Inline Elements
<a>
<applet>
<area>
<basefont>
<bdo>
<br>
<font>
<iframe>
<img>
<map>
<object>
<param>
<q>
<script>
<span>
<sub>
<sup>
Phrase Elements
<abbr>
<acronym>
<cite>
<code>
<del>
<dfn>
<em>
<ins>
<kbd>
<samp>
<strong>
<var>
Font Style Elements
<b>
<big>
<i>
<s>
<small>
<strike>
<tt>
<u>
Frames
<frame>
<frameset>
<noframes>

 

Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us