xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to apply CSS style using HTML id attribute
CSS Online Editor
Run Code
More CSS Sample Codes
</body> </html> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Apply CSS style using id name</title> <!--Internal CSS style--> <style> /* example of using id attribute: use # to define id*/ #para { color: blueviolet; font-size: 28px; } #para1 { color: blue; font-size: 22px; } </style> </head> <body> <h1>How to apply CSS style using id name?</h1> <p>Use id name as selector. Here id name 'para' and 'para1' are used as selector to apply css color and font-size style to specified paragraph.</p> <p id="para">This is a paragrapgh</p> <p id="para1">This is another paragrapgh</p> </body> </html>