Datamatics Frequently Asked CSS Interview Questions

Datamatics Most Frequently Asked Latest CSS Interview Questions Answers

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?

It makes sense in some situations, but not in others. For example, when a childelement 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.

Why Call The Subtended Angle A Pixel, Instead Of Something Else (e.g. Subangle)?

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

How Do I Eliminate The Blue Border Around Linked Images?

in your CSS, you can specify the border property for linked images

a img { border: none ; }

However, note that removing the border that indicates an image is a link makes it harder for users to distinguish quickly and easily which images on a web page are clickable.

Which Property Is Used To Change The Face Of A Font?

The font-family property is used to change the face of a font.

Which Property Is Used To Make A Font Italic Or Oblique?

The font-style property is used to make a font italic or oblique.

Which Property Is Used To Create A Small-caps Effect?

The font-variant property is used to create a small-caps effect.
Datamatics Most Frequently Asked Latest CSS Interview Questions Answers
Datamatics Most Frequently Asked Latest CSS Interview Questions Answers

What Is A Style Sheet?

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.

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

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

Why Do Style Sheets Exist?

SGML (of which HTML is a derivative) was meant to be a device-independent method for conveying a document's structural and semantic content (its meaning.) It was never meant to convey physical formatting information. HTML has crossed this line and now contains many elements and attributes which specify visual style and formatting information. One of the main reasons for style sheets is to stop the creation of new HTML physical formatting constructs and once again separate style information from document content.

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

What Is Css Rule Ruleset?

There are two types of CSS rules: ruleset and at-rule. Ruleset identifies selector orselectors 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.

Which Property Is Used To Set The Background Image Of An Element?

The background-image property is used to set the background image of an element.

Which Property Is Used To Control The Repetition Of An Image In The Background?

The background-repeat property is used to control the repetition of an image in the background.

Which Property Is Used As Shorthand To Specify A Number Of Other Font Properties?

The font property is used as shorthand to specify a number of other font properties.

Who maintains the CSS specifications?

World Wide Web Consortium maintains the CSS specifications.

In how many ways can a CSS be integrated as a web page?

CSS can be integrated in three ways:

Inline: Style attribute can be used to have CSS applied HTML elements.
Embedded: The Head element can have a Style element within which the code can be placed.
Linked/ Imported: CSS can be placed in an external file and linked via link element.

What benefits and demerits do External Style Sheets have?

Benefits:

One file can be used to control multiple documents having different styles.
Multiple HTML elements can have many documents, which can have classes.
To group styles in composite situations, methods as selector and grouping are used.

Demerits:

Extra download is needed to import documents having style information.
To render the document, the external style sheet should be loaded.
Not practical for small style definitions.

What is the origin of CSS ?

Standard Generalized Markup Language marked the beginning of style sheets in 1980s.

What are the different variations of CSS ?

The variations for CSS are:

CSS 1
CSS 2
CSS 2.1
CSS 3
CSS 4

What are the limitations of CSS ?

Limitations are:

 Ascending by selectors is not possible
Limitations of vertical control
No expressions
No column declaration
Pseudo-class not controlled by dynamic behavior
Rules, styles, targeting specific text not possible

What are the advantages of CSS ?

Advantages are:

Bandwidth
Site-wide consistency
Page reformatting
Accessibility
Content separated from presentation

What are CSS frameworks?

It is a pre-planned libraries, which allows easier and more standards-compliant webpage styling, using CSS language.

How block elements can be centered with CSS1?

Block level elements can be centered by:

The margin-left and margin-right properties can be set to some explicit value:

CSS

BODY {
width: 40em;
background: fluorescent;
}
P {
width: 30em;
margin-right: auto;
margin-left: auto
}

BODY {

width: 40em;

background: fluorescent;

}

P {

width: 30em;

margin-right: auto;

margin-left: auto

}

In this case, the left and right margins will be each, five ems wide since they split up the ten ems left over from (40em-30em). It was unnecessary for setting up an explicit width for the BODY element; it was done here for simplicity.

Post a Comment

Previous Post Next Post