CSS ID Selector

The Web Book

A paragraph styled with id selector

This paragraph is not affected by the style.


CSS ID Selector Example Code

HTML CODE ........................................................ <!DOCTYPE html> <html> <body> <p id="para1">A paragraph styled with id selector</p> <p>This paragraph is not affected by the style.</p> </body> </html> CSS CODE .................... #para1 { text-align:center; color:red; } Back