Hi,
Freinds,
please post your replies for below questions for sharing our knowledge on CSS

  1. What is CSS?
  2. What are Style Sheets?
  3. What is external Style Sheet? How to link?
  4. What is embedded style? How to link?
  5. What is inline style? How to link?
  6. What is imported Style Sheet? How to link?
  7. What is alternate Style Sheet? How to link?
  8. What is persistent style?
  9. What is preferred style?
  10. How do I combine multiple sheets into one?
  11. What is CSS rule 'ruleset'?
  12. What is CSS rule 'at-rule'?
  13. What is selector?
  14. What is CLASS selector?
  15. What is ID selector?
  16. What is contextual selector?
  17. What is attribute selector? [CSS2]
  18. What is parent-child selector? [CSS2]
  19. What is CSS declaration?
  20. What is 'important' declaration?
  21. What is property?
  22. What is shorthand property?
  23. What is value?
  24. What is initial value?
  25. Can I attach more than one declaration to a selector?
  26. What is class?
  27. What is grouping?
  28. What are pseudo-elements?
  29. What are pseudo-classes?
  30. What is cascade?
  31. What is cascading order?
  32. What are inline, block, parent, children, replaced and floating elements?
  33. How does inheritance work?
  34. Are Style Sheets case sensitive?
  35. Which characters can CSS-names contain?
  36. Can I include comments in my Style Sheet?
  37. Can Style Sheets and HTML stylistic elements be used in the same document?
  38. Which set of definitions, HTML attributes or CSS properties, take precedence?
  39. Can CSS be used with other than HTML documents?

Recommended Answers

All 2 Replies

1. What is CSS?

CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. Every element type as well as every occurance of a specific element within that type can be declared an unique style, e.g. margins, positioning, color or size.

2. What are Style Sheets?

Style Sheets are templates, very similar to templates in desktop publishing applications, containing a collection of rules declared to various selectors (elements).

3. What is external Style Sheet? How to link?

External Style Sheet is a template/document/file containing style information which can be linked with any number of HTML documents. This is a very convenient way of formatting the entire site as well as restyling it by editing just one file.

The file is linked with HTML documents via the LINK element inside the HEAD element. Files containing style information must have extension .css, e.g. style.css.

<HEAD>
<LINK REL=STYLESHEET HREF="style.css" TYPE="text/css">
</HEAD>

4. What is embedded style? How to link?

Embedded style is the style attached to one specific document. The style information is specified as a content of the STYLE element inside the HEAD element and will apply to the entire document.

<HEAD>
<STYLE TYPE="text/css">
<!--
P {text-indent: 10pt}
-->
</STYLE>
</HEAD>

Note: The styling rules are written as a HTML comment, that is, between <!-- and --> to hide the content in browsers without CSS support which would otherwise be displayed.

5 .What is inline style? How to link?

Inline style is the style attached to one specific element. The style is specified directly in the start tag as a value of the STYLE attribute and will apply exclusively to this specific element occurance.

<P STYLE="text-indent: 10pt">Indented paragraph</P>

6. What is imported Style Sheet? How to link?

Imported Style Sheet is a sheet that can be imported to (combined with) another sheet. This allows creating one main sheet containing declarations that apply to the whole site and partial sheets containing declarations that apply to specific elements (or documents) that may require additional styling. By importing partial sheets to the main sheet a number of sources can be combined into one.

To import a style sheet or style sheets include the @import notation or notations in the STYLE element. The @import notations must come before any other declaration. If more than one sheet is imported they will cascade in order they are imported - the last imported sheet will override the next last; the next last will override the second last, and so on. If the imported style is in conflict with the rules declared in the main sheet then it will be overridden.
<LINK REL=STYLESHEET HREF="main.css" TYPE="text/css">
<STYLE TYPE="text=css">
<!--
@import url(http://www.and.so.on.partial1.css);
@import url(http://www.and.so.on.partial2.css);
.... other statements
-->
</STYLE>

7.What is alternate Style Sheet? How to link?

Alternate Style Sheet is a sheet defining an alternate style to be used in place of style(s) declared as persistent and/or preferred .

Persistent style is a default style that applies when style sheets are enabled but can disabled in favor of an alternate style, e.g.:

<LINK REL=Stylesheet HREF="style.css" TYPE="text/css">

Preferred style is a default style that applies automatically and is declared by setting the TITLE attribute to the LINK element. There can only be one preferred style, e.g.:

<LINK REL=Stylesheet HREF="style2.css" TYPE="text/css" TITLE="appropriate style description">

Alternate style gives an user the choice of selecting an alternative style - a very convenient way of specifying a media dependent style. Note: Each group of alternate styles must have unique TITLE, e.g.:

<LINK REL="Alternate Stylesheet" HREF="style3.css" TYPE="text/css" TITLE="appropriate style description" MEDIA=screen>
<LINK REL="Alternate Stylesheet" HREF="style4.css" TYPE="text/css" TITLE="appropriate style description" MEDIA=print>

Alternate stylesheets are not yet supported.

8. What is persistent style?

Se Alternate style

9. What is preferred style?

Se Alternate style

10. How do I combine multiple sheets into one?

To combine multiple/partial style sheets into one set the TITLE attribute taking one and the same value to the LINK element. The combined style will apply as a preferred style, e.g.:

<LINK REL=Stylesheet HREF="default.css" TITLE="combined">
<LINK REL=Stylesheet HREF="fonts.css" TITLE="combined">
<LINK REL=Stylesheet HREF="tables.css" TITLE="combined">

11. What is CSS rule 'ruleset'?

There are two types of CSS rules: ruleset and at-rule. Ruleset identifies selector or selectors and declares style which is to be attached to that selector or selectors. For example P {text-indent: 10pt} is a CSS rule. CSS rulesets consist of two parts: selector, e.g. P and declaration, e.g. {text-indent: 10pt}.

P {text-indent: 10pt} - CSS rule (ruleset)
{text-indent: 10pt} - CSS declaration
text-indent - CSS property
10pt - CSS value

<----------------------------------------->

Hope thats enough for you! If the rest of yall are interested in the remaining answers. Why don't you just visit the website.

http://www.hwg.org/resources/faqs/cssFAQ.html#toc

Other than that. I dont appreciate you bitting my signature. Not cool dude. not cool.

Other than that. I dont appreciate you bitting my signature. Not cool dude. not cool.

It was only your one, he used my too LOL

@sreein1986 - why do you ask all these questions. Most of it can be found on w3schools website and little google search from your side wouldn't hurt

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.