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 are the creational design patterns

0 Answers   Infosys,


What is architecture and what is design?

0 Answers  


What is single tone design pattern in java?

0 Answers  


Using any system, product, or service your organization provides, identify the human system roles for the product.

0 Answers  


What are cascaded style sheets?

1 Answers  






When should design patterns be used?

0 Answers  


Name some of the analytical tools and KPIs that you used in your evaluations.

3 Answers  


What are useful tools for developing and testing color schemes for web sites?

0 Answers   Wipro,


What is mvp 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,


Can we inherit singleton class?

0 Answers  


What are the most popular design patterns?

0 Answers  


Categories