style Attribute

Description

The style attribute defines a CSS style directly on an element as opposed to in a style element or external stylesheet.

Example


<!DOCTYPE HTML>
<html>
<body>
      <a href="http://java2s.com"  
         style="background: grey; color:white;  padding:10px"> 
         Visit the site<!--  w w  w  . ja va  2 s . c  om-->
      </a>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    HTML »




HTML Introduction
HTML Document
HTML Section
HTML Group Content
HTML Text Marker
HTML Table
HTML Form
HTML Embed