t..." /> What Is A Mixed Selector In CSS? t..." /> t..." />
Answers

Question and Answer:

  Home  Cascading Style Sheet CSS

⟩ What Is a Mixed Selector in CSS?

A mixed selector is a selector that uses a combination of all other selectors. The following CSS shows some good examples:

/* selects <p class="quote"> tags */

P.quote {font-style: italic}

/* selects <p class="quote" id="onSale"> tags */

P.quote#onSale {color: red}

/* selects <p class=quote id=onSale> tags inside <table> */

TABLE P.quote#onSale {background-color: red}

/* selects <pre class=quote id=onSale> tags inside <table>

and <pre id="onSale"> tags */

TABLE P.quote#onSale, PRE#onSale {background-color: red}

 205 views

More Questions for you: