Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain Vbscript In Detail.

Answer»

This is a scripting LANGUAGE DEVELOPED by Microsoft and is BASED loosely on Visual Basic. Its functionality in a web environment is dependant upon EITHER an ASP engine or the Windows Scripting Host, and must be used on a Windows HOSTING platform.

This is a scripting language developed by Microsoft and is based loosely on Visual Basic. Its functionality in a web environment is dependant upon either an ASP engine or the Windows Scripting Host, and must be used on a Windows hosting platform.

2.

List Various Font Attributes Used In Style Sheet.

Answer»

font-style
font-variant
font-weight
font-size/line-height
font-family
CAPTION
ICON
MENU
message-box
small-caption
status-bar

font-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar

3.

What Are Style Sheet Properties?

Answer»

CSS Background
CSS TEXT
CSS Font
CSS BORDER
CSS Outline
CSS MARGIN
CSS Padding
CSS LIST
CSS Table

CSS Background
CSS Text
CSS Font
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS List
CSS Table

4.

What Are The Various Style Sheets?

Answer»

Inline, external, IMPORTED and EMBEDDED are the DIFFERENT types of style SHEETS.

Inline, external, imported and embedded are the different types of style sheets.

5.

Explain In Brief About The Term Css.

Answer»

A stylesheet LANGUAGE used to describe the presentation of a document WRITTEN in a MARKUP language. Cascading STYLE Sheets are a BIG breakthrough in Web design because they allow developers to control the style and layout of multiple Web pages all at once.

A stylesheet language used to describe the presentation of a document written in a markup language. Cascading Style Sheets are a big breakthrough in Web design because they allow developers to control the style and layout of multiple Web pages all at once.

6.

What Is Extensible Stylesheet Language (xsl)?

Answer»

XSL is a proposed STYLING language for formatting XML (eXtensible Markup Language) DOCUMENTS. The proposal was submitted to the W3C by Microsoft, Inso, and ArborText.

XSL is a proposed styling language for formatting XML (eXtensible Markup Language) documents. The proposal was submitted to the W3C by Microsoft, Inso, and ArborText.

7.

Document Style Semantics And Specification Language (dsssl)?

Answer»

Document Style Semantics and SPECIFICATION Language is an international standard, an EXPRESSION language, a STYLING language for associating processing (formatting and transformation) with SGML DOCUMENTS, for example XML.

Document Style Semantics and Specification Language is an international standard, an expression language, a styling language for associating processing (formatting and transformation) with SGML documents, for example XML.

8.

Can You Use Someone Else's Style Sheet Without Permission?

Answer»

This is a somewhat fuzzy issue. As with HTML tags, style sheet information is given using a special language syntax. Use of the language is not copyrighted, and the syntax itself does not convey any content - only rendering information.

It is not a great idea to reference an EXTERNAL style sheet on someone else's server. Doing this is like referencing an in-line image from someone else's server in your HTML DOCUMENT. This can end up overloading a server if too many pages all over the net reference the same item. It can't HURT to contact the author of a style sheet, if known, to discuss using the style sheet, but this may not be POSSIBLE. In any CASE, a local copy should be created and used instead of referencing a remote copy.

This is a somewhat fuzzy issue. As with HTML tags, style sheet information is given using a special language syntax. Use of the language is not copyrighted, and the syntax itself does not convey any content - only rendering information.

It is not a great idea to reference an external style sheet on someone else's server. Doing this is like referencing an in-line image from someone else's server in your HTML document. This can end up overloading a server if too many pages all over the net reference the same item. It can't hurt to contact the author of a style sheet, if known, to discuss using the style sheet, but this may not be possible. In any case, a local copy should be created and used instead of referencing a remote copy.

9.

Do Url's Have Quotes Or Not?

Answer»

Double or SINGLE quotes in URLS are OPTIONAL. The tree following examples are equally VALID:

BODY {background: url(pics/wave.png) blue}
BODY {background: url("pics/wave.png") blue}
BODY {background: url('pics/wave.png') blue}

Double or single quotes in URLs are optional. The tree following examples are equally valid:

BODY {background: url(pics/wave.png) blue}
BODY {background: url("pics/wave.png") blue}
BODY {background: url('pics/wave.png') blue}

10.

Do Any Wysiwyg Editors Support The Creation Of Style Sheets? Any Text-based Html Editors?

Answer»

As support for CSS in browsers has matured in the last YEAR, both WYSIWYG and Text-based HTML editors have appeared that allow the creation or the assistance of creating Cascading STYLE SHEET syntax. There are now at least two DOZEN editors supporting CSS syntax in some form. The W3C maintains an up-to-date list of these WYSIWYG and text-based editors.

As support for CSS in browsers has matured in the last year, both WYSIWYG and Text-based HTML editors have appeared that allow the creation or the assistance of creating Cascading Style Sheet syntax. There are now at least two dozen editors supporting CSS syntax in some form. The W3C maintains an up-to-date list of these WYSIWYG and text-based editors.

11.

Must I Quote Property Values?

Answer»

Generally no. However, VALUES CONTAINING white spaces, e.g. FONT-family names should be quoted as white spaces SURROUNDING the font name are ignored and whitespaces inside the font name are converted to a single space, thus font names made up of more than one word (e.g.) 'TIMES New Roman' are interpreted as three different names: Times, New and Roman.

Generally no. However, values containing white spaces, e.g. font-family names should be quoted as white spaces surrounding the font name are ignored and whitespaces inside the font name are converted to a single space, thus font names made up of more than one word (e.g.) 'Times New Roman' are interpreted as three different names: Times, New and Roman.

12.

What Is The Percentage Value In 'font-size' Relative To?

Answer»

It is RELATIVE to the parent element's font-size. For example, if the style SHEET says:

H1 {font-size: 20pt;}
SUP {font-size: 80%;}

...then a <SUP> INSIDE an <H1> will have a font-size of 80% TIMES 20pt, or 16pt.

It is relative to the parent element's font-size. For example, if the style sheet says:

H1 {font-size: 20pt;}
SUP {font-size: 80%;}

...then a <SUP> inside an <H1> will have a font-size of 80% times 20pt, or 16pt.

13.

Can I Attach More Than One Declaration To A Selector?

Answer»

Yes. If more than one declaration is attached to a selector they must appear in a SEMI COLON SEPARATED list, e.g.;

Selector {declaration1; declaration2}
P {background: white; color: black}

Yes. If more than one declaration is attached to a selector they must appear in a semi colon separated list, e.g.;

Selector {declaration1; declaration2}
P {background: white; color: black}

14.

How To Style Forms?

Answer»

Forms and form elements like SELECT, INPUT etc. can be styled with CSS - partially.

Checkboxes and Radiobuttons do not YET accept STYLES, and Netscape 4.xx has certain issues, but here is a tutorial that EXPLAINS the application of CSS Styles on Form Elements.

Forms and form elements like SELECT, INPUT etc. can be styled with CSS - partially.

Checkboxes and Radiobuttons do not yet accept styles, and Netscape 4.xx has certain issues, but here is a tutorial that explains the application of CSS Styles on Form Elements.

15.

How To Style Table Cells?

Answer»

Margin, Border and PADDING are difficult to apply to inline elements. OFFICIALLY, the <TD> tag is a BLOCK level element because it can CONTAIN other block level elements (see Basics - Elements). 

If you need to set special margins, borders, or padding inside a table cell, then use this markup:

<td>
yourtext </div></td> 
to apply the CSS RULES to the div inside the cell. </p>

Margin, Border and Padding are difficult to apply to inline elements. Officially, the <TD> tag is a block level element because it can contain other block level elements (see Basics - Elements). 

If you need to set special margins, borders, or padding inside a table cell, then use this markup:

<td>
yourtext </div></td> 
to apply the CSS rules to the div inside the cell. </p>

16.

How Far Can Css Be Taken Beyond The Web Page--that Is, Have Generalized Or Non-web Specific Features For Such Things As Page Formatting Or Type Setting?

Answer»

YES, it's possible to take CSS further in several directions. W3C just published a NEW Working DRAFT which describes features for printing, e.g., footnotes, cross-references, and even generated indexes.

Another great opportunity for CSS is Web Applications. Just like documents, applications need to be styled and CSS is an INTRINSIC component of AJAX. The "AJAX" name sounds great.

Yes, it's possible to take CSS further in several directions. W3C just published a new Working Draft which describes features for printing, e.g., footnotes, cross-references, and even generated indexes.

Another great opportunity for CSS is Web Applications. Just like documents, applications need to be styled and CSS is an intrinsic component of AJAX. The "AJAX" name sounds great.

17.

How Frustrating Is It To Write A Specification Knowing That You're At The Browser Vendors' Mercy?

Answer»

That's part of the game. I don't think any specification has a birthright to be fully SUPPORTED by all BROWSERS. There should be healthy competition between different specifications. I believe simple, author-friendly specifications will prevail in this ENVIRONMENT.

Microformats are another way of developing new formats. Instead of having to CONVINCE browser vendors to support your favorite specification, microformats add semantics to HTML through the CLASS attribute. And style it with CSS.

That's part of the game. I don't think any specification has a birthright to be fully supported by all browsers. There should be healthy competition between different specifications. I believe simple, author-friendly specifications will prevail in this environment.

Microformats are another way of developing new formats. Instead of having to convince browser vendors to support your favorite specification, microformats add semantics to HTML through the CLASS attribute. And style it with CSS.

18.

What Is Initial Value?

Answer»

INITIAL value is a default value of the PROPERTY, that is the value given to the root element of the document tree. All properties have an initial value. If no SPECIFIC value is set and/or if a property is not inherited the initial value is used. For example the background property is not inherited, however, the background of the parent element shines through because the initial value of background property is transparent. 

<P style="background: red">HELLO <strong>World </strong> </P>
CONTENT of the element P will also have red background

Initial value is a default value of the property, that is the value given to the root element of the document tree. All properties have an initial value. If no specific value is set and/or if a property is not inherited the initial value is used. For example the background property is not inherited, however, the background of the parent element shines through because the initial value of background property is transparent. 

<P style="background: red">Hello <strong>World </strong> </P>
Content of the element P will also have red background

19.

Why Shouldn't I Use Fixed Sized Fonts ?

Answer»

Only in very rare situations we will find users that have a "calibrated" rendering device that shows fixed font sizes correct. This TELLS us that we can never know the real size of a font when it's rendered on the user end. Other people may find your CHOICE of font size uncomfortable. A surprisingly large number of people have vision problems and require larger text than the average. Other people have good eyesight and prefer the advantage of more text on the screen that a smaller font size allows. What is comfortable to you on your system may be uncomfortable to someone else. Browsers have a default size for fonts. If a user finds this inappropriate, they can change it to something they prefer. You can never assume that your choice is better for them. So, leave the font size alone for the majority of your text. If you wish to change it in specific places (say smaller text for a copyright notice at the BOTTOM of page), use relative units so that the size will stay in relationship to what the user may have selected already. Remember, if people find your text uncomfortable, they will not bother struggling with your web SITE. Very few (if any) web sites are important enough to the average user to justify fighting with the AUTHOR's idea of what is best.

Only in very rare situations we will find users that have a "calibrated" rendering device that shows fixed font sizes correct. This tells us that we can never know the real size of a font when it's rendered on the user end. Other people may find your choice of font size uncomfortable. A surprisingly large number of people have vision problems and require larger text than the average. Other people have good eyesight and prefer the advantage of more text on the screen that a smaller font size allows. What is comfortable to you on your system may be uncomfortable to someone else. Browsers have a default size for fonts. If a user finds this inappropriate, they can change it to something they prefer. You can never assume that your choice is better for them. So, leave the font size alone for the majority of your text. If you wish to change it in specific places (say smaller text for a copyright notice at the bottom of page), use relative units so that the size will stay in relationship to what the user may have selected already. Remember, if people find your text uncomfortable, they will not bother struggling with your web site. Very few (if any) web sites are important enough to the average user to justify fighting with the author's idea of what is best.

20.

What Browsers Support Style Sheets? To What Extent?

Answer»

Microsoft's Internet Explorer version 3.0 Beta 2 and above supports CSS, as does Netscape Communicator 4.0 Beta 2 and above and Opera 3.5 and above. Take note that the early implementations in these browsers did not support ALL of the properties and syntax described in the full CSS1 specification and beyond. Later versions have been getting much closer to full CSS1 compliance, but then comes the next hurdle - CSS2...it was such a big leap over CSS1 that it has taken the browsers years to come close to SUPPORTING a MAJORITY of CSS2's features. Mozilla and Opera's current versions both offer excellent CSS standards compliance. The Macintosh version of Internet Explorer is said to be very impressive in its CSS capabilities as WELL, but PC IE lags behind these implementations. QUITE a few other implementations of CSS now exist in browsers that are not as widely-used (such as Amaya, Arena and Emacs-W3), but coverage of features in these documents CURRENTLY only covers Internet Explorer, NCSA Mosaic, Netscape and Opera browsers.

Microsoft's Internet Explorer version 3.0 Beta 2 and above supports CSS, as does Netscape Communicator 4.0 Beta 2 and above and Opera 3.5 and above. Take note that the early implementations in these browsers did not support ALL of the properties and syntax described in the full CSS1 specification and beyond. Later versions have been getting much closer to full CSS1 compliance, but then comes the next hurdle - CSS2...it was such a big leap over CSS1 that it has taken the browsers years to come close to supporting a majority of CSS2's features. Mozilla and Opera's current versions both offer excellent CSS standards compliance. The Macintosh version of Internet Explorer is said to be very impressive in its CSS capabilities as well, but PC IE lags behind these implementations. Quite a few other implementations of CSS now exist in browsers that are not as widely-used (such as Amaya, Arena and Emacs-W3), but coverage of features in these documents currently only covers Internet Explorer, NCSA Mosaic, Netscape and Opera browsers.

21.

Which Characters Can Css-names Contain?

Answer»

The CSS-names; names of selectors, CLASSES and IDs can contain characters a-z, A-Z, digits 0-9, period, hyphen, ESCAPED characters, Unicode characters 161-255, as well as any Unicode CHARACTER as a numeric code. The names cannot start with a dash or a digit. (NOTE: in HTML the value of the CLASS attribute can contain more characters).

The CSS-names; names of selectors, classes and IDs can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code. The names cannot start with a dash or a digit. (Note: in HTML the value of the CLASS attribute can contain more characters).

22.

Is There Anything That Can't Be Replaced By Style Sheets?

Answer»

Quite a bit actually. Style sheets only SPECIFY information that controls display and rendering information. Virtual style ELEMENTS that convey the NATURE of the CONTENT can not be replaced by style sheets, and hyperlinking and multimedia object insertion is not a part of style sheet functionality at all (although controlling how those objects appear IS part of style sheets functionality.) The CSS1 specification has gone out of its way to absorb ALL of the HTML functionality used in controlling display and layout characteristics. For more information on the possible properties in CSS, see the Index DOT Css Property Index.

Rule of Thumb: if an HTML ELEMENT or attribute gives cues as to how its contents should be displayed, then some or all of its functionality has been absorbed by style sheets.

Quite a bit actually. Style sheets only specify information that controls display and rendering information. Virtual style elements that convey the NATURE of the content can not be replaced by style sheets, and hyperlinking and multimedia object insertion is not a part of style sheet functionality at all (although controlling how those objects appear IS part of style sheets functionality.) The CSS1 specification has gone out of its way to absorb ALL of the HTML functionality used in controlling display and layout characteristics. For more information on the possible properties in CSS, see the Index DOT Css Property Index.

Rule of Thumb: if an HTML element or attribute gives cues as to how its contents should be displayed, then some or all of its functionality has been absorbed by style sheets.

23.

How Can I Make A Page Look The Same In E.g. Ns And Msie ?

Answer»

The simple answer is, you can't, and you shouldn't waste your time trying to make it exactly the same. Web browsers are ALLOWED, PER definition, to interpret a page as they like, subject to the general rules set down in the HTML and CSS specifications. As a web author you can not have a prior knowledge of the exact situation and/or medium that will be used to render your page, and it's almost always RATHER counterproductive to try to control that process. There is no NECESSITY for a well-written page to look the same in different browsers. You may want to strive to ensure that it looks good in more than one browser, even if the actual display (in the case of graphical browsers) comes out a bit different. "Looking good" can be achieved by adopting sensible design and guidelines, such as not fixing the size or face of your fonts, not fixing the width of tables, etc… Don't fight the medium; most web users only use one browser and will never know, or bother to find out, that your page looks different, or even "BETTER", in any other browser.

The simple answer is, you can't, and you shouldn't waste your time trying to make it exactly the same. Web browsers are allowed, per definition, to interpret a page as they like, subject to the general rules set down in the HTML and CSS specifications. As a web author you can not have a prior knowledge of the exact situation and/or medium that will be used to render your page, and it's almost always rather counterproductive to try to control that process. There is no necessity for a well-written page to look the same in different browsers. You may want to strive to ensure that it looks good in more than one browser, even if the actual display (in the case of graphical browsers) comes out a bit different. "Looking good" can be achieved by adopting sensible design and guidelines, such as not fixing the size or face of your fonts, not fixing the width of tables, etc… Don't fight the medium; most web users only use one browser and will never know, or bother to find out, that your page looks different, or even "better", in any other browser.

24.

How Do I Write My Style Sheet So That It Gracefully Cascades With User's Personal Sheet ?

Answer»

You can help with this by setting properties in recommended places. Style rules that apply to the WHOLE document should be SET in the BODY ELEMENT -- and only there. In this way, the user can easily MODIFY document-wide style settings.

You can help with this by setting properties in recommended places. Style rules that apply to the whole document should be set in the BODY element -- and only there. In this way, the user can easily modify document-wide style settings.

25.

What Is Property?

Answer»

Property is a stylistic PARAMETER (attribute) that can be influenced through CSS, e.g. FONT or WIDTH. There must ALWAYS be a corresponing value or values set to each property, e.g. font: bold or font: bold san-serif.

Property is a stylistic parameter (attribute) that can be influenced through CSS, e.g. FONT or WIDTH. There must always be a corresponing value or values set to each property, e.g. font: bold or font: bold san-serif.

26.

What Can Be Done With Style Sheets That Can Not Be Accomplished With Regular Html?

Answer»

Many of the recent extensions to HTML have been tentative and somewhat CRUDE attempts to control document layout. Style sheets go several steps beyond, and introduces complex border, margin and spacing control to most HTML elements. It ALSO extends the capabilities introduced by most of the existing HTML browser extensions. Background colors or IMAGES can now be assigned to ANY HTML element instead of just the BODY element and borders can now be applied to any element instead of just to tables. For more INFORMATION on the possible properties in CSS, see the Index DOT Css PROPERTY Index.

Many of the recent extensions to HTML have been tentative and somewhat crude attempts to control document layout. Style sheets go several steps beyond, and introduces complex border, margin and spacing control to most HTML elements. It also extends the capabilities introduced by most of the existing HTML browser extensions. Background colors or images can now be assigned to ANY HTML element instead of just the BODY element and borders can now be applied to any element instead of just to tables. For more information on the possible properties in CSS, see the Index DOT Css Property Index.

27.

How Do I Quote Font Names In Quoted Values Of The Style Attribute?

Answer»

The attribute values can contain both single quotes and DOUBLE quotes as long as they come in matching pairs. If two pair of quotes are REQUIRED include single quotes in double ones or vice VERSA:

<P STYLE="font-family: 'New Times Roman'; font-size: 90%">
<P STYLE='font-family: "New Times Roman"; font-size: 90%'>

It's been REPORTED the latter method doesn't work very well in some browsers, therefore the first one should be used.

The attribute values can contain both single quotes and double quotes as long as they come in matching pairs. If two pair of quotes are required include single quotes in double ones or vice versa:

<P STYLE="font-family: 'New Times Roman'; font-size: 90%">
<P STYLE='font-family: "New Times Roman"; font-size: 90%'>

It's been reported the latter method doesn't work very well in some browsers, therefore the first one should be used.

28.

Styles Not Showing?

Answer»

There are different ways to apply CSS to a HTML document with a STYLESHEET, and these different ways can be combined:

* INLINE (INTERNAL) (Deprecated for XHTML)
* EMBEDDED (internal)
* linked (external) and
* @import (external)

Note: An external stylesheet is a text file that contains only CSS Styles. HTML comments are not supposed to be in there and can lead to misinterpretation (> is the CSS "Child" SELECTOR!).

There are different ways to apply CSS to a HTML document with a stylesheet, and these different ways can be combined:

* inline (internal) (Deprecated for XHTML)
* embedded (internal)
* linked (external) and
* @import (external)

Note: An external stylesheet is a text file that contains only CSS Styles. HTML comments are not supposed to be in there and can lead to misinterpretation (> is the CSS "Child" selector!).

29.

How Do I Have A Non-tiling (non-repeating) Background Image?

Answer»

With CSS, you can use the BACKGROUND-repeat property. The background repeat can be included in the short HAND background property, as in this example:

body {
background: white url(example.gif) no-repeat ;
COLOR: BLACK ;
}

With CSS, you can use the background-repeat property. The background repeat can be included in the short hand background property, as in this example:

body {
background: white url(example.gif) no-repeat ;
color: black ;
}

30.

Are Style Sheets Case Sensitive?

Answer»

No. Style SHEETS are case insensitive. Whatever is case insensitive in HTML is also case insensitive in CSS. However, parts that are not under control of CSS like font FAMILY names and URLs can be case sensitive - IMAGE.gif and image.gif is not the same file.

No. Style sheets are case insensitive. Whatever is case insensitive in HTML is also case insensitive in CSS. However, parts that are not under control of CSS like font family names and URLs can be case sensitive - IMAGE.gif and image.gif is not the same file.

31.

What Is Cascade?

Answer»

CASCADE is a method of DEFINING the weight (importance) of individual styling rules thus allowing conflicting rules to be SORTED out should such rules apply to the same selector. 

Declarations with increased weight take precedence over declaration with NORMAL weight:

P {color: white ! IMPORTANT} /* increased weight */
P (color: black} /* normal weight */

Cascade is a method of defining the weight (importance) of individual styling rules thus allowing conflicting rules to be sorted out should such rules apply to the same selector. 

Declarations with increased weight take precedence over declaration with normal weight:

P {color: white ! important} /* increased weight */
P (color: black} /* normal weight */

32.

What Is 'important' Declaration?

Answer»

Important declaration is a declaration with increased WEIGHT. Declaration with increased weight will OVERRIDE declarations with normal weight. If both reader's and author's STYLE sheet contain statements with important declarations the author's declaration will override the reader's.

BODY {BACKGROUND: white ! important; color: black}

In the example above the background property has increased weight while the color property has normal.

Important declaration is a declaration with increased weight. Declaration with increased weight will override declarations with normal weight. If both reader's and author's style sheet contain statements with important declarations the author's declaration will override the reader's.

BODY {background: white ! important; color: black}

In the example above the background property has increased weight while the color property has normal.

33.

What Is Css Declaration?

Answer»

CSS declaration is style attached to a SPECIFIC selector. It CONSISTS of two parts; property which is EQUIVALENT of HTML ATTRIBUTE, e.g. text-indent: and value which is equivalent of HTML value, e.g. 10pt. NOTE: properties are always ended with a colon.

CSS declaration is style attached to a specific selector. It consists of two parts; property which is equivalent of HTML attribute, e.g. text-indent: and value which is equivalent of HTML value, e.g. 10pt. NOTE: properties are always ended with a colon.

34.

What Is Selector?

Answer»

CSS selector is equivalent of HTML ELEMENT(s). It is a string identifying to which element(s) the CORRESPONDING declaration(s) will apply and as such the link between the HTML DOCUMENT and the STYLE sheet.

For example in P {text-indent: 10pt} the selector is P and is called type selector as it matches all instances of this element type in the document.

in P, UL {text-indent: 10pt} the selector is P and UL (see GROUPING); in .class {text-indent: 10pt} the selector is .class (see class selector).

CSS selector is equivalent of HTML element(s). It is a string identifying to which element(s) the corresponding declaration(s) will apply and as such the link between the HTML document and the style sheet.

For example in P {text-indent: 10pt} the selector is P and is called type selector as it matches all instances of this element type in the document.

in P, UL {text-indent: 10pt} the selector is P and UL (see grouping); in .class {text-indent: 10pt} the selector is .class (see class selector).

35.

What Is Css Rule 'at-rule'?

Answer»

There are two types of CSS RULES: ruleset and at-rule. At-rule is a rule that applies to the WHOLE style sheet and not to a SPECIFIC selector only (LIKE in ruleset). They all begin with the @ symbol followed by a keyword made up of LETTERS a-z, A-Z, digits 0-9, dashes and escaped characters, e.g. @import or @font-face.

There are two types of CSS rules: ruleset and at-rule. At-rule is a rule that applies to the whole style sheet and not to a specific selector only (like in ruleset). They all begin with the @ symbol followed by a keyword made up of letters a-z, A-Z, digits 0-9, dashes and escaped characters, e.g. @import or @font-face.

36.

Why Use Style Sheets?

Answer»

STYLE sheets allow a much greater degree of layout and display control than has EVER been possible thus far in HTML. The amount of format coding necessary to control display characteristics can be greatly reduced through the use of external style sheets which can be used by a group of documents. Also, multiple style sheets can be INTEGRATED from different sources to form a cohesive tapestry of styles for a document. Style sheets are also backward compatible - They can be mixed with HTML styling elements and attributes so that older BROWSERS can view content as intended.

Style sheets allow a much greater degree of layout and display control than has ever been possible thus far in HTML. The amount of format coding necessary to control display characteristics can be greatly reduced through the use of external style sheets which can be used by a group of documents. Also, multiple style sheets can be integrated from different sources to form a cohesive tapestry of styles for a document. Style sheets are also backward compatible - They can be mixed with HTML styling elements and attributes so that older browsers can view content as intended.

37.

How Do I Design For Backward Compatibility Using Style Sheets?

Answer»

Existing HTML STYLE methods (such as <font SIZE> and <b>) may be EASILY combined with style SHEET specification methods. Browsers that do not understand style sheets will USE the older HTML formatting methods, and style sheets specifications can control the appearance of these ELEMENTS in browsers that support CSS1.

Existing HTML style methods (such as <font SIZE> and <b>) may be easily combined with style sheet specification methods. Browsers that do not understand style sheets will use the older HTML formatting methods, and style sheets specifications can control the appearance of these elements in browsers that support CSS1.

38.

Can Style Sheets And Html Stylistic Elements Be Used In The Same Document?

Answer»

Yes. STYLE SHEETS will be ignored in BROWSERS WITHOUT CSS-support and HTML stylistic elements used.

Yes. Style Sheets will be ignored in browsers without CSS-support and HTML stylistic elements used.

39.

Can Css Be Used With Other Than Html Documents?

Answer»

YES. CSS can be USED with any ny STRUCTURED document format. e.g. XML, however, the method of linking CSS with other document TYPES has not been DECIDED yet.

Yes. CSS can be used with any ny structured document format. e.g. XML, however, the method of linking CSS with other document types has not been decided yet.

40.

Why Was The Decision Made To Make Padding Apply Outside Of The Width Of A 'box', Rather Than Inside, Which Would Seem To Make More Sense?

Answer»

It makes sense in some situations, but not in others. For example, when a child ELEMENT is set to width: 100%, I don't think it should cover the padding of its parent. The box-sizing property in CSS3 ADDRESSES this issue. Ideally, the issue should have been addressed EARLIER, though.

It makes sense in some situations, but not in others. For example, when a child element is set to width: 100%, I don't think it should cover the padding of its parent. The box-sizing property in CSS3 addresses this issue. Ideally, the issue should have been addressed earlier, though.

41.

Why Call The Subtended Angle A "pixel", Instead Of Something Else (e.g. "subangle")?

Answer»

In most cases, a CSS pixel will be equal to a device pixel. But, as you point out, the definition of a CSS pixel will sometimes be different. For example, on a laser PRINTER, one CSS pixel can be equal to 3X3 device pixels to AVOID printing illegibly small text and images. I don't RECALL anyone ever PROPOSING another name for it. Subangle? Personally, I think most people would prefer the pragmatic "px" to the non-intuitive "sa".

In most cases, a CSS pixel will be equal to a device pixel. But, as you point out, the definition of a CSS pixel will sometimes be different. For example, on a laser printer, one CSS pixel can be equal to 3x3 device pixels to avoid printing illegibly small text and images. I don't recall anyone ever proposing another name for it. Subangle? Personally, I think most people would prefer the pragmatic "px" to the non-intuitive "sa".

42.

Which Set Of Definitions, Html Attributes Or Css Properties, Take Precedence?

Answer»

CSS PROPERTIES TAKE precedence over HTML attributes. If both are specified, HTML attributes will be displayed in BROWSERS without CSS SUPPORT but won't have any effect in browsers with CSS support.

CSS properties take precedence over HTML attributes. If both are specified, HTML attributes will be displayed in browsers without CSS support but won't have any effect in browsers with CSS support.

43.

How Do I Combine Multiple Sheets Into One?

Answer»

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">

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">

44.

Why Does My Content Shift To The Left On Some Pages (in Ff)?

Answer»

That'll be the pages with more content? The ones that have a vertical scrollbar? If you look in IE there's probably a WHITE space on the right where there would be a scrollbar if there were enough content to require one. In Firefox, the scrollbar appears when it's needed and the viewport becomes about 20px smaller, so the content seems to shift to the left when you MOVE from a page with LITTLE content to one with lots of content. It's not a bug or something that needs to be fixed, but it does confuse and irritate some developers.

If, for some reason, you'd like Firefox to always have SCROLLBARS - whether they're needed or not - you can do this :

CSS html {
height:100.1%;
}

That'll be the pages with more content? The ones that have a vertical scrollbar? If you look in IE there's probably a white space on the right where there would be a scrollbar if there were enough content to require one. In Firefox, the scrollbar appears when it's needed and the viewport becomes about 20px smaller, so the content seems to shift to the left when you move from a page with little content to one with lots of content. It's not a bug or something that needs to be fixed, but it does confuse and irritate some developers.

If, for some reason, you'd like Firefox to always have scrollbars - whether they're needed or not - you can do this :

CSS html {
height:100.1%;
}

45.

How Do I Place Text Over An Image?

Answer»

To place text or image over an image you use the position property. The below example is supported by IE 4.0. All you have to do is ADAPT the units to your need.

<div style="position: RELATIVE; width: 200px; height: 100px">
<div style="position: absolute; top: 0; LEFT: 0; width: 200px">
<image>
</div>
<div style="position: absolute; top: 20%; left: 20%; width: 200px">
Text that nicely wraps
</div>
</div>

To place text or image over an image you use the position property. The below example is supported by IE 4.0. All you have to do is adapt the units to your need.

<div style="position: relative; width: 200px; height: 100px">
<div style="position: absolute; top: 0; left: 0; width: 200px">
<image>
</div>
<div style="position: absolute; top: 20%; left: 20%; width: 200px">
Text that nicely wraps
</div>
</div>

46.

What Is A Style Sheet?

Answer»

Style sheets are the WAY that standards-compliant Web designers define the layout, look-and-feel, and design of their pages. They are called Cascading Style Sheets or CSS. With style sheets, a designer can define many aspects of a Web page:

* fonts
* colors
* layout
* positioning
* imagery
* accessibility

Style sheets give you a lot of power to define how your pages will look. And another great THING about them is that style sheets MAKE it really easy to update your pages when you want to make a new design. Simply load in a new style sheet onto your pages and you're done.

Style sheets are the way that standards-compliant Web designers define the layout, look-and-feel, and design of their pages. They are called Cascading Style Sheets or CSS. With style sheets, a designer can define many aspects of a Web page:

* fonts
* colors
* layout
* positioning
* imagery
* accessibility

Style sheets give you a lot of power to define how your pages will look. And another great thing about them is that style sheets make it really easy to update your pages when you want to make a new design. Simply load in a new style sheet onto your pages and you're done.

47.

What Is Inline Style? How To Link?

Answer»

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 occurrence.

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

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 occurrence.

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

48.

How Do I Have A Background Image That Isn't Tiled?

Answer»

Specify the background-repeat property as no-repeat. You can ALSO use the background property as a SHORTCUT for SPECIFYING MULTIPLE background-* properties at once. Here's an example:

BODY {background: #FFF url(watermark.jpg) no-repeat;}

Specify the background-repeat property as no-repeat. You can also use the background property as a shortcut for specifying multiple background-* properties at once. Here's an example:

BODY {background: #FFF url(watermark.jpg) no-repeat;}

49.

What Is Embedded Style? How To Link?

Answer»

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.

&LT;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.

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.

50.

'fixed' Background?

Answer»

There is the possibility to use the HTML tag bgproperties="fixed", but that is IE proprietary, and DEPENDENT upon the 'background' attribute (deprecated in HTML4).

With CSS, you can declare the background like:

BODY {
font-family : "TREBUCHET MS", Verdana, Arial, Helvetica, sans-serif;
background-image: url(images/yourimage.gif);
background-repeat: no-repeat; /*no-tiling background*/
background-position: center;
background-attachment: fixed;
background-color: #hexcolor;
color : #hexcolor;
margin: 10px;
}

that SHOWS a background-image in the center of the &LT;BODY> element, non-scrolling and non-repeating - in IE or NN6. NN 4.xx gets the non-repeat-part right, but stuffs the picture in the upper left corner and scrolls ...

There is the possibility to use the HTML tag bgproperties="fixed", but that is IE proprietary, and dependent upon the 'background' attribute (deprecated in HTML4).

With CSS, you can declare the background like:

BODY {
font-family : "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
background-image: url(images/yourimage.gif);
background-repeat: no-repeat; /*no-tiling background*/
background-position: center;
background-attachment: fixed;
background-color: #hexcolor;
color : #hexcolor;
margin: 10px;
}

that shows a background-image in the center of the <BODY> element, non-scrolling and non-repeating - in IE or NN6. NN 4.xx gets the non-repeat-part right, but stuffs the picture in the upper left corner and scrolls ...