Advertise with us

CSS '*' selector; what is it?

Posted by  Pravesh Singh
 1663  View(s)
Rate this:
Hi Everyone!

I have seen many time in css file greater than sign "*", but not understand why used it.
Please provide any suitable demo.

Please help me!
  1. Re: CSS '*' selector; what is it?

    Hi Pravesh!


        write something here.......!

    Selects all elements

    For example

    <html xmlns="">
    <head runat="server">
        <style type="text/css">
            * {
                background-color: #e5e5e5;
        <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>
    From the above example, you can see "background-color" apply on html element such that <body>, <div>, <p>