HTML CSS examples for HTML Global Attribute:id
Use the id attribute to style text with CSS:
<html> <head> <style> #myHeader {<!--from w w w. j a va2 s . c o m--> color: red; text-align: center; } </style> </head> <body> <h1 id="myHeader">W3Schools is the best!</h1> </body> </html>