- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 601 Articles for Front End Scripts
827 Views
You may need to define multiple style rules for a single element. You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example: h1 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; }Here all the property and value pairs are separated by a semicolon (;). You can keep them in a single line or multiple lines. For better readability, we keep them on separate lines.
350 Views
You can also apply styles to HTML elements with particular attributes. The style rule below will match all the input elements having a type attribute with a value of text −input[type = "text"]{ color: #000000; }The following are the rules applied to attribute selector. p[lang] - Selects all paragraph elements with a lang attribute. p[lang="fr"] - Selects all paragraph elements whose lang attribute has a value of exactly "fr". p[lang~="fr"] - Selects all paragraph elements whose lang attribute contains the word "fr". p[lang|="en"] - Selects all paragraph elements whose lang attribute contains values that are exactly "en", or begin with "en-".Read More
396 Views
You can define style rules based on the id attribute of the elements. All the elements having that id will be formatted according to the defined rule. #black { color: #000000; }This rule renders the content in black for every element with id attribute set to black in our document. You can make it a bit more particular. For example:h1#black { color: #000000; }This rule renders the content in black for only elements with id attribute set to black.The true power of id selectors is when they are used as the foundation for descendant selectors, For example:#black h2 ... Read More
406 Views
You can define style rules based on the class attribute of the elements. All the elements having that class will be formatted according to the defined rule..black { color: #808000; }This rule renders the content in black for every element with class attribute set to black in our document. You can make it a bit more particular. For example:h1.black { color: #808000; }This rule renders the content in black for only elements with class attribute set to black.You can apply more than one class selectors to given element. Consider the following example: This para will be ... Read More
366 Views
Suppose you want to apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to element only when it lies inside tag.ul em { color: #FFFF00; }Suppose now for element and style rule applied to :ol strong { color: #808000; }
5K+ Views
CSS comprises of style rules interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts −Selector - A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.Property - A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border etc.Value - Values assigned to properties. For example, the color property can have value either red or #F1F1F1 etcYou can put CSS Style Rule Syntax as ... Read More
158 Views
The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation.These ratified specifications are called recommendations because the W3C has no control over the actual implementation of the language. Independent companies and organizations create that software.The World Wide Web Consortium or W3C is a group that makes recommendations about how the Internet works and how it should evolve.
356 Views
CSS invented by Håkon Wium Lie on October 10, 1994, and maintained by a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation.These ratified specifications are called recommendations because the W3C has no control over the actual implementation of the language. Independent companies and organizations create that software.