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.

The declaration should be terminated by:(a) :(b) ;(c) .(d) ,

Answer»

Correct answer is (b) ;

2.

What is the property to set text as bold?(a) Font-Style(b) Font-Weight(c) Font-Property(d) Font-Bold

Answer»

Correct answer is (b) Font-Weight

3.

Which of the following indicates that the text included is a comment?(a) /**/(b) !* *!(c) <* *>(d) \* *\

Answer»

Correct answer is (a) /**/

4.

What is the use of <style> tag?

Answer»

We are already know about the formatting tags and its attributes, in some situations, you may need to use a tag uniformly in the entire document. To do so, we can use <style> tag. A style tag is used to change the default characteristics of a particular tag in the entire web document wherever that tag is used.

5.

What is CSS?

Answer»

Cascading Style Sheets (CSS) are also called as Sitewide Style sheets or external style. CSS is a style sheet language used for describing the formatting of a document written in HTML. Using CSS, you can control the font colour, font style, spacing between pages, columns size, border colour, background image or colour and various other effects in a web page.

6.

Which of the following ways below is correct, to write a CSS?(a) p{coloured; text-align:center};(b) p {colonred; text-align:center}(c) p {color:red; text-align:center;}(d) p (color:red;text-align:center;)

Answer»

(c) p {color:red; text-align:center;}

7.

List and explain the Font and text element properties and values used CSS?

Answer»
FormattingPropertiesValuesExample
Text alignmentText-alignCenter/left/Right/justifyp
{
Text-align : center,
}
Text colourColorPredefined_color_NameP
{
color:pink;
{
H1
{
Color: MediumseaGreen:
}
`Font typeFont-familyFont_nameP
{
Font.family: "times New Roman";
}
Font styleFont-styleNormal/ItalicP
{
Font.family: "Times New Roman";
{
Font Style (Bold)Font-WeightNormal/BoldP
{
Font - family : "Times New Roman";
Font-weight : bold;
}
Font sizeFont - sizeSize in pixelsP
{
Font-family: "Times New Roman";
Font -style :Italic;
Font-weight: 14px;
}

8.

Write an HTML document to display the following oaragraph as per the given description Using CSS:

Answer»

Font Name:

Cooper Black

Style:

Bold Italics

Color:

Blue “The State Institute of Education (SIE) was established in 1965 to provide for systematic study of problems relating to School Education under the administration of Directorate of School Education.”

9.

The extension of CSS file is:(a) .ssc(b) .css(c) .CSC(d) .htm

Answer»

Correct answer is (b) .css

10.

Write down general format of CSS declaration?

Answer»

The body of the style sheet consists of a series of rules.

Selector:

HTML Tag

Declaration:

{Properties: Values}

11.

Write the general format of linking CSS with HTML?

Answer»

The <link> tag is used to add CSS file with HTML in head section. While using <link> tag, the following attributes are also included along with standard values.

rel = “stylesheet”

type = “text/css”

The href attribute is used to link the .css file. General format of <Link> tag:

<Link rel = “stylesheet” type = “text/css” href = CSS_ File_Name_with_Extension>

12.

What are the advantages of using CSS?

Answer»

Maintainability:

CSS are also defined and stored as separate files. So, the style and appearance of a web page can be dynamically changed and maintain with less effort.

Reusability:

The styles defined in CSS can be reused in multiple HTML pages.

Easy to understand:

The tags in web pages are well organized with style specifications and therefore it is easy to understand.

13.

Wrie a CSS file to define text color and alignment to &lt;p&gt; tag?

Answer»

The style properties are defined to <p> tag. Hereafter, whenever you use the <p>, the contents will be displayed with modified properties.

If you want to use the above style definition as an internal style then it should be specified within <style>,</style> block in head section. If you want store the above definition for using all your web pages, you should save the above code as a separate file with extension.css

14.

Write the html code to change the background colour of browser using CSS?

Answer»

– Back_Color.css —

body

{

background-color : pink;

}

Background_CSS.htm

<html>

<head>

<title> Changing Background using CSS </title>

<link rel = “stylesheet” type=”text/css” href=”Body_Color.css”> </head>

<body>

<H1> Welcome to CSS

</H1>

</body>

</html>

15.

Write the properties and values of paragraph margin in CSS?

Answer»
FormattingPropetiesValuesExample
Paragraph MarginMargin - top
Margin - bottom
Margin - left
Margin - right
Margin size in pixelsP
{
Margin - top : 50 px ;
Margin - left : 50 px;
}

16.

Which is used to define style for a particular tag anywhere in a HTML document?(a) Internal style(b) Inline style(c) External style(d) Page style

Answer»

Correct answer is (b) Inline style

17.

Write a short note on rule of CSS?

Answer»

CSS style declaration consists of two major parts; Selector and Declaration. The Selector refers an HTML tag in which you want to apply styles.

The Declaration is a block of code contains style definition. It should be surrounded by curly braces. You can include any number of properties for each selector, and they must be separated by semicolons, The property name and its value should be separated by a colon. Each declaration should be terminated by a semicolon (;).

Eg:

SelectorDeclaration of properties and values
P{
Font - size : 16 pt;
Color : red;
font - weight : bold;
}

18.

What is Inline Style?

Answer»

“Inline style”, which is used to define style for a particular tag anywhere in an HTML document. You can define styles for any tag within an HTML document. But it is applicable only on that line where it is defined. If you use the same tag, again in the same documnet, it does not reflect the new style.

19.

CSS was invented by:(a) Hakon Wium Lie(b) Hakon Willium Lee(c) Hakon Street Man(d) Hakon Lee

Answer»

(a) Hakon Wium Lie

20.

The &lt;style&gt; tag are also called as:(a) page-level styles(b) inline styles(c) external styles(d) both (a) &amp; (c)

Answer»

(a) page-level styles