---
title: "CSS '*' selector; what is it?"  
description: "CSS '*' selector; what is it?"  
author: "Pravesh Singh"  
published: 2013-04-16  
updated: 2013-04-16  
canonical: https://www.mindstick.com/forum/764/css-selector-what-is-it  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# CSS '*' selector; what is it?

Hi Everyone!\
I have seen many time in [css](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) greater than sign "*", but not understand why used it.Please provide any suitable demo.\
Please help me!

## Replies

### Reply by AVADHESH PATEL

Hi Pravesh!\
Syntax\
*{ write something here.......!}\
Selects all elements\
For example\
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <style type="text/css"> * { background-color: #e5e5e5; } </style></head><body> <form id="form1" runat="server"> <div id="red" style="height: 150px; border: 2px solid #ff0000;"> <div id="green" style="height: 60px; border: 2px solid #00ff00;"> <p>Star sign (*) CSS Selector demo</p> </div> </div> </form></body></html> From the above example, you can see "background-color" apply on html element such that <body>, <div>, <p>\


---

Original Source: https://www.mindstick.com/forum/764/css-selector-what-is-it

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
