How to add CSS styles Styles to Elements with Particular
Attributes?
Answer Posted / 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 View All Answers
What are the categories in which the design patterns can be divided?
What is the difference between 3 tier and n tier architecture?
What are creational design patterns?
What is the difference between factory and strategy design pattern?
What is the difference between builder and composite?
what is the lazy design pattern?
Hi, I have 9backlogs in btech and i am 2008 passed out,am working with an MNC from past 3 years.now, am willing to do MS, will it be any problem for me?
What are the most important software design patterns?
Why do we need singleton pattern?
What is the factory pattern in the design pattern?
Describe the builder design pattern
Explain what is good design?
Why is singleton bad?
Is singleton a design pattern?
when performing a functional test on a phone calculator,if pressing on a button does not function what do i do next