Apigee Most Frequently Asked Latest CSS Interview Questions Answers

What Is An Attribute Selector?

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 advantage to this method is that the  element is unaffected, and the color applied only to the desired text fields.

How To Select All Paragraph Elements With A Lang Attribute?

p[lang] : Selects all paragraph elements with a lang attribute.

How To Select All Paragraph Elements Whose Lang Attribute Has A Value Of Exactly "fr"?

p[lang="fr"] - Selects all paragraph elements whose lang attribute has a value of exactly "fr".

How To Select All Paragraph Elements Whose Lang Attribute Contains The Word "fr"?

p[lang~="fr"] - Selects all paragraph elements whose lang attribute contains the word "fr".

How To Select All Paragraph Elements Whose Lang Attribute Contains Values That Are Exactly "en", Or Begin With "en-"?

p[lang|="en"] - Selects all paragraph elements whose lang attribute contains values that are exactly "en", or begin with "en-".
Apigee Most Frequently Asked Latest CSS Interview Questions Answers
Apigee Most Frequently Asked Latest CSS Interview Questions Answers

What Are The Various Ways Of Using Css In An Html Page?

There are four ways to associate styles with your HTML document. Most commonly used methods are inline CSS and External CSS.

Embedded CSS − The

Which Property Is Used To Set The Text Shadow Around A Text?

The text-shadow property is used to set the text shadow around a text.

Which Property Is Used To Set The Width Of An Image Border?

The border property is used to set the width of an image border.

Which Property Is Used To Set The Height Of An Image?

The height property is used to set the height of an image.

Which Property Is Used To Set The Width Of An Image?

The width property is used to set the width of an image.

How Css Style Overriding Works?

Following is the rule to override any Style Sheet Rule

Any inline style sheet takes highest priority. So, it will override any rule defined in <style>...</style> tags or rules defined in any external style sheet file.

Any rule defined in <style>...</style> tags will override rules defined in any external style sheet file.

Any rule defined in external style sheet file takes lowest priority, and rules defined in this file will be applied only when above two rules are not applicable.

What Is The Purpose Of % Measurement Unit?

% - Defines a measurement as a percentage relative to another value, typically an enclosing element.

p {font-size: 16pt; line-height: 125%;}

What Is The Purpose Of Cm Measurement Unit?

cm − Defines a measurement in centimeters.

div {margin-bottom: 2cm;}

What Is The Purpose Of Em Measurement Unit?

em − A relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.

p {letter-spacing: 7em;}

What Is The Purpose Of Ex Measurement Unit?

ex − This value defines a measurement relative to a font's x-height. The x-height is determined by the height of the font's lowercase letter.

p {font-size: 24pt; line-height: 3ex;}

What Are Advantages Of Using Css?

Following are the advantages of using CSS −
•CSS saves time − You can write CSS once and then reuse same sheet in multiple HTML pages. You can define a style for each HTML element and apply it to as many Web pages as you want.
•Pages load faster − If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag. So less code means faster download times.
•Easy maintenance − To make a global change, simply change the style, and all elements in all the web pages will be updated automatically.
•Superior styles to HTML − CSS has a much wider array of attributes than HTML, so you can give a far better look to your HTML page in comparison to HTML attributes.
•Multiple Device Compatibility − Style sheets allow content to be optimized for more than one type of device. By using the same HTML document, different versions of a website can be presented for handheld devices such as PDAs and cell phones or for printing.
•Global web standards − Now HTML attributes are being deprecated and it is being recommended to use CSS. So its a good idea to start using CSS in all the HTML pages to make them compatible to future browsers.
•Offline Browsing − CSS can store web applications locally with the help of an offline catche.Using of this, we can view offline websites.The cache also ensures faster loading and better overall performance of the website.
•Platform Independence − The Script offer consistent platform independence and can support latest browsers as well.

What Is The Purpose Of Vmin Measurement Unit?

vmin 1vw or 1vh, whichever is smaller.

p { font-size: 2vmin;}.

Post a Comment

Previous Post Next Post