The style Attribute
The style attribute allows you to define an inline CSS style directly on an element.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<a href="http://java2s.com"
style="background: grey; color: white; padding: 10px"> Visit the site </a>
</body>
</html>
Home
HTML CSS Book
HTML
HTML CSS Book
HTML
HTML5 Global Attributes:
- The accesskey Attribute
- The class Attribute
- The contenteditable Attribute
- The contextmenu Attribute
- The dir Attribute
- The draggable Attribute
- The dropzone Attribute
- The hidden Attribute
- The id Attribute
- The lang Attribute
- The spellcheck Attribute
- The style Attribute
- The tabindex Attribute
- The title Attribute
Related: