Page 74 - Code & Click - 7
P. 74
2. Open the HTML document in Microsoft Edge.
P
Post-Processingost-Processing
Cascading Style Sheets or CSS is used in an HTML document to apply formatting to various
elements on a web page.
Each rule within CSS has two components: a selector and a declaration.
The Selector specifies the element to which you want to apply a style rule and is followed
by a space.
The Declaration specifies the formatting rules for the selector. It consists of a property and
its value separated by a colon.
CSS can be applied in HTML documents in form of Embedded or Internal CSS, Inline CSS,
and External CSS.
An Embedded CSS is a part of an HTML document and is defined in the <head> section of
the document, using the <style> element.
An Inline CSS is defined in an HTML document inside the body section to specify formatting
for specific elements.
An External CSS is a separate document that contains the style rules for various elements.
Info Retention
A. Select the correct option for each of the following statements.
1. The margin property used to set all margins of an element in one declaration is ______.
(a) margin-all (b) all-margin (c) margin (d) four margin
2. The property used to control the horizontal position of blocks of text in a web page is ______.
(a) text-align (b) text-place (c) text-shadow (d) text-transform
3. The property that is used to control the capitalisation of text in a web page is
(a) text-capitalisation (b) text-transform (c) text-case (d) text-decoration
4. An Inline CSS is specified by adding the style attribute to the
(a) <html> tag (b) <body> tag (c) <title> tag (d) <html> tag
72