
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to use style attribute to define style rules?
You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:
<element style = "...style rules....">
The following is an example:
<html> <head> </head> <body> <p style = "color:#36C;"> This is inline CSS </p> </body> </html>
- Related Articles
- How to define multiple style rules for a single element in CSS?
- Style Rules in CSS
- How to use the tag to define style information for an HTML page?
- How to work with style attribute in HTML?
- HTML style Attribute
- Rules to override Style Sheet Rule in CSS
- How to use JTextPane to style code in Java?
- How to define media type of style tag in HTML5?
- How to define style information of a document using HTML5?
- How to use Notification Inbox style in Android
- How to use inline CSS (Style Sheet) in HTML?
- How to use internal CSS (Style Sheet) in HTML?
- How to use CSS style in PowerShell HTML Output?
- How to use @counter-style rule to customize list item using CSS?
- What are the ways to include style sheet rules in an HTML document

Advertisements