- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Working with Inline CSS
Associate styles with your HTML document using methods inline CSS and External CSS.
You can use style attribute of any HTML element to define inline style rules. These rules will be applied to that element only. Here is the generic syntax:
<element style = "...style rules....">
The follow
ing is the attribute:
Attribute | Value | Description |
---|---|---|
style | style rules | The value of style attribute is a combination of style declarations separated by a semicolon (;). |
Let us see an example:
<html> <head> </head> <body> <h2 style = "color:#800000;"> This is inline CSS </h2> </body> </html>
Advertisements