HTML with CSS Tutorial

Many time developer want to use CSS in  HTML tag. In this tutorial we learn how to use CSS with HTML tag in inline?

Maximum HTML tag support inline CSS style code. You can use all CSS code in inline CSS code, like use in stylesheet.

How to use CSS in HTML tag?

If you want to use CSS with HTML tag then first write your needed HTML tag e.g: <p></p> then write your CSS code in inline of HTML code. e.g: <p style="color:green;font-size:18px;">Your text here...</p> 

Note: in inline CSS code must be write <tagname style=" here css code here " > </closetagname> format.

Structure of HTML with inline CSS

<!DOCTYPE html>
<html lang="en">
<title>HTML Tutorials</title>
<h1 style="color:red;">HTML Heading</h1> <!-- with heading -->
<p style="color:green;">HTML Paragraph</p> <!-- with paragraph -->

Double Click to Select Code

Find us on

Facebook Google Plus Twitter Pinterest YouTube

web hit counter