CSS - Cascading Style Sheets: book back answers
20 solved questions from the end of this chapter, Class 11 Computer Applications, Tamil Nadu State Board. Each answer is checked against the textbook, and you can open the page that proves it.
← Notes and quiz for CSS - Cascading Style SheetsChoose the correct answer
Expansion of CSS
- (A) Cascading Style Schools
- (B) Cascading Style Scheme
- (C) Cascading Style Sheets
- (D) Cascading Style Shares
Try it, then show the answerAnswer
(C) Cascading Style Sheets
The chapter expands CSS as Cascading Style Sheets.
From the book: “Cascading Style Sheets (CSS) are also called as Sitewide Style sheets”
Which of the following is the page level style?
- (A) <Page>
- (B) <Style>
- (C) <Link>
- (D) <H>
Try it, then show the answerAnswer
(B) <Style>
The chapter identifies the <style> tag as a page-level or internal style sheet.
From the book: “The “Internal Style sheet” is defined and implemented only within an HTML document.”
CSS is also called as:
- (A) Sitewide Style Sheets
- (B) Internal Style Sheets
- (C) Inline Style Sheets
- (D) Internal Inline Sheets
Try it, then show the answerAnswer
(A) Sitewide Style Sheets
CSS is described as sitewide style sheets or external style.
From the book: “Cascading Style Sheets (CSS) are also called as Sitewide Style sheets or external style.”
The extension of CSS file is
- (A) .ssc
- (B) .css
- (C) .csc
- (D) .htm
Try it, then show the answerAnswer
(B) .css
Separate CSS style files are saved with the .css extension.
From the book: “The separate file should be saved with the extension .css”
What is selector?
- (A) Property
- (B) Value
- (C) HTML tag
- (D) name
Try it, then show the answerAnswer
(C) HTML tag
A selector refers to the HTML tag to which the styles are applied.
From the book: “The Selector refers an HTML tag in which you want to apply styles.”
The Declaration block of CSS is surrounded by
- (A) ( )
- (B) [ ]
- (C) { }
- (D) <>
Try it, then show the answerAnswer
(C) { }
The declaration block must be enclosed in curly braces.
From the book: “The Declaration is a block of code contains style definition. It should be surrounded by curly braces.”
The declaration should be terminated by
- (A) :
- (B) ;
- (C) .
- (D) ,
Try it, then show the answerAnswer
(B) ;
Each CSS declaration ends with a semicolon.
From the book: “Each declaration should be terminated by a semicolon ( ; ).”
What is the property to set text as bold?
- (A) Font-Style
- (B) Font-Weight
- (C) Font-Property
- (D) Font-Bold
Try it, then show the answerAnswer
(B) Font-Weight
The chapter lists bold as a value for the font-weight property.
From the book: “Font-weight Normal / Bold”
Which of the following indicates that the text included is a comment ?
- (A) /* */
- (B) !* *!
- (C) <* *>
- (D) \* *\
Try it, then show the answerAnswer
(A) /* */
CSS comments are placed inside /* and */.
From the book: “You can simplyput your comments inside /*.....this is a comment in style sheet.....*/.”
Which of the following ways below is correct to write a CSS?
- (A) p{color:red; text-align:center};
- (B) p {color:red; text-align:center}
- (C) p {color:red; text-align:center;}
- (D) p (color:red;text-align:center;)
Try it, then show the answerAnswer
(C) p {color:red; text-align:center;}
CSS uses curly braces for the declaration block, and declarations are terminated by semicolons. Option C follows both rules.
From the book: “It should be surrounded by curly braces. You can include any number of properties for each selector, and they must be separated by semicolons.”
Very Short Answers
What is the use of <style> tag?
Try it, then show the answerAnswer
The <style> tag controls the presentation styles of a particular HTML document.
It defines the appearance of a tag throughout the document wherever that tag is used.
From the book: “The <style> tag controls the presentation styles of a particular HTML document.”
What is CSS?
Try it, then show the answerAnswer
CSS (Cascading Style Sheets) is a style sheet language used for describing the formatting of a document written in HTML.
CSS specifies how HTML content is presented, including fonts, spacing, borders, and backgrounds.
From the book: “CSS is a style sheet language used for describing the formatting of a document written in HTML.”
Write the general format of linking CSS with HTML.
Try it, then show the answerAnswer
<Link rel = “stylesheet” type = “text/css” href = CSS_File_Name_with_Extension>
The link tag is placed in the head section; its href attribute identifies the CSS file.
From the book: “The <link> tag is used to add CSS file with HTML in head section.”
What is Inline Style?
Try it, then show the answerAnswer
Inline style defines a style for a particular tag anywhere in an HTML document, and it applies only to the line where it is defined.
Using the same tag again in the document does not make the inline style apply to that other line.
From the book: “But it is applicable only on that line where it is defined .”
Write down general format of CSS declaration.
Try it, then show the answerAnswer
HTML Tag { Properties : Values; }
The HTML tag is the selector, followed by a declaration block in curly braces containing property-value pairs.
From the book: “HTML Tag { Properties : Values; }”
Short Answers
What are the advantages of using CSS?
Try it, then show the answerAnswer
Maintainability, reusability, and ease of understanding.
CSS files allow styles to be changed with less effort, reused on multiple HTML pages, and keep style specifications organized with webpage tags.
From the book: “The styles defined in CSS can be reused in multiple HTML pages.”
Write a short note on rule of CSS.
Try it, then show the answerAnswer
A CSS style sheet consists of a series of rules. Each rule has a selector and a declaration block. The selector refers to an HTML tag, and the declaration block contains style definitions enclosed in curly braces. Properties and values are separated by a colon, declarations by semicolons, and each declaration ends with a semicolon.
These rules define which HTML element receives the specified formatting and how the properties are written.
From the book: “CSS style declaration consists of two major parts; Selector and Declaration.”
Write a CSS file to define font type, style and size to <h1> tag.
Try it, then show the answerAnswer
H1 { font-family: "Times New Roman"; font-style: Italic; font-size: 14px; }
The chapter gives Times New Roman as a font-family example, Italic as a font-style value, and 14px as a font-size example.
From the book: “Font-family : “Times New Roman”; Font-style : Italic; Font-size : 14px;”
Part-IV Explain in Detail
Write an HTML document to display the following paragraph as per the given description Using CSS: • 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.”
Try it, then show the answerAnswer
<html> <head> <title>Formatting paragraph using CSS</title> <style> P { font-family: "Cooper Black"; font-style: Italic; font-weight: Bold; color: blue; } </style> </head> <body> <P>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.</P> </body> </html>
The style rule applies the requested font family, italic style, bold weight, and blue color to the paragraph.
From the book: “Font-weight Normal / Bold”
List and explain the Font and text element properties and values used CSS.
Try it, then show the answerAnswer
CSS text-formatting properties control the appearance of text in HTML elements. Each property is assigned a value in a CSS declaration.
- Text colour: The color property sets the text colour. Its value is a predefined colour name.
- Text alignment: The text-align property aligns text to the center, left, right or with justified alignment.
- Font type: The font-family property specifies the font type by giving a font name.
- Font style: The font-style property specifies whether the font is normal or italic.
- Font weight: The font-weight property sets the font weight to normal or bold.
Example: P { Font-family : “Times New Roman”; Font-style : Italic; Font-size : 14px; }
These properties and values are used to format text and fonts in CSS.
From the book: “Font-style Normal / Italic”