HTML4 Reference

HTML <style> tag


The <style> tag and its' closing <style> tag allows us to put style information into our HTML documents and must reside within the <head> </head> element.


<html  xmlns="">
  <title>Appears in browser toolbar, favourites and search engime results.</title>

  <style type="text/css">.red {color: red;} </style>


  <h1 class="red">Importing Files and Using Meta Information</h1>

Required Attributes

type specifies the MIME type of the style sheet.

<style type="text/javascript"></style>

Optional Attributes

media specifies a media with which the link is associated with.

<!-- media values supported in all browsers are (all, print, and screen) -->]

<!-- Other possible values are (aural, braille, handheld, projection tty and tv) -->
<style type="text/javascript" media="print"></style> 

Common Attributes


Language Attributes

dir - specifies the directional flow of the content.

<style dir="ltr"></style>   <!-- The text will flow from left to right -->
<style dir="rtl"></style>   <!-- The text will flow from right to left -->

lang - specifies a language code for the content of the element.

<style lang="en"></style>

xml:lang - specifies a language code for the content of the element in XHTML documents.

<style xml:lang="fr"></style>

Event Attributes


<strong> tags    << Prev          Next >>  <sub> tag

go to home page Homepage go to top of page Top