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


Please Help Members By Posting Answers For Below Questions

Is singleton an anti pattern?

587


What are the main types of concurrency design patterns?

585


What is the use of repository pattern?

579


What are structural design patterns?

607


Contact a system development program in your organization. Research how they analyzed their SYSTEM OF INTEREST (SOI), its OPERATING ENVIRONMENT, and their respective system elements. How was this analysis reflected in the SOI architecture?

3632






What are the design patterns you know explain?

593


Why have we used synchronized here?

614


Describe the builder design pattern

671


What is the behavioral design pattern?

660


What is the prototype design pattern?

634


what is the lazy design pattern?

607


Is singleton scope thread safe?

624


What is the use of such a class?

668


Which design pattern is mostly used in net?

581


What are the disadvantages of singleton pattern?

586