How to add CSS styles Styles to Elements with Particular
Attributes?



How to add CSS styles Styles to Elements with Particular Attributes?..

Answer / swapna

The style rule below will match all input elements that has
a type attribute with a value of "text"
Input[type="text"] {background-color: blue}

id Selector

Defining styles for HTML elements with the id selector. The
id selector is defined as a #.
The style defined below will effect the element that has an
id attribute with a value of "green? ie., id=?green?
Ex: #green {color: green}
The style rule below will match the p element that has an
id with a value of "para1? ie., <p id=?para1?>
p#para1
{
text-align: center;
color: red
}
Do NOT start a class name or ID name with a number


Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Design Patterns Interview Questions

What is viper architecture?

0 Answers  


What is aop design?

0 Answers  


What is the difference between factory and strategy design pattern?

0 Answers  


Can any one suggest me the best institute for Software Design , Design Patterns and architecture in Hyderabad please. Thanks in Advance.

2 Answers   IBM, KPIT,


What is Software development life cycle....??

5 Answers   TCS,






Which design pattern is mostly used in net?

0 Answers  


What is grouping in CSS?

1 Answers  


What are External Style Sheets?

1 Answers  


What is onion architecture?

0 Answers  


what is cascading order?

1 Answers  


what is the lazy design pattern?

0 Answers  


What is use case in clean architecture?

0 Answers  


Categories