.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Interview Question >> Others >> Post New Question Subscribe to Interview Questions

What are Style Sheets?

Posted By : LEANORD     Posted Date :October 27, 2011    Points :40   Category :Others 
Style Sheets are templates, very similar to templates in desktop publishing applications, containing a collection of rules declared to various selectors (elements).

You can also find related Interview Question to What are Style Sheets?  below: 

Explain inline, embedded and external style sheets .

There are three ways of inserting a style sheet:

1. External style sheet
2. Internal style sheet
3. Inline style

External Style Sheet :
An external style sheet is ideal when the style is applied to many pages.
With an external style sheet, you can change the look of an entire Web site by changing one file.
Each page must link to the style sheet using the tag. The tag goes inside the head section:

Internal Style Sheet :
An internal style sheet should be used when a single document has a unique style. Internal styles sheet needs to put in the head section of an HTML page, by using the

Inline Styles :
If only a small piece of code has to be styled then inline style sheets can be used.
An inline style loses many of the advantages of style sheets by mixing content with presentation.
To use inline styles you use the style attribute in the relevant tag.
The style attribute can contain any CSS property.
The example shows how to change the color and the left margin of a paragraph:

This is a paragraph.


Is Ajax a technology platform or is it an architectural style?

Its both. Ajax is a set of technologies being used together in a particular way. (More...)

What is embedded style? How to link?

The HEAD area, where the TITLE and META tags are found, is also used to store CSS commands.
These are called embedded CSS. Any embedded CSS command will over-ride an external CSS command of the same tag. Embedded commands are more specific to the page.

Embedded CSS codes are placed within the HEAD area of the page code. That is anywhere after the tag and before the tag. NOT in the HEAD tag itself.

Now, whenever any of those elements are used within the body of the document, they will be formatted as instructed in the above style sheet. (More...)

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


How to change style on an element?

Between CSS and javascript is a weird symmetry. CSS style rules are layed on top of the DOM. The CSS property names like "font-weight" are transliterated into "myElement.style.fontWeight". The class of an element can be swapped out. For example:
document.getElementById("myText").style.color = "green";
document.getElementById("myText").style.fontSize = "20";
document.getElementById("myText").className = "regular"; (More...)

Which is the style sheet language for XML document?

XSL is the stylesheet language for XML documents (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend