Advertisements
Advertisements
Question
Write the equivalent CSS code to set the following styles for a web page:
- The entire page's background color should be yellow.
- Second-level Heading properties should be as follows:
- The text color should be Red.
- Left margin should be 25 px.
Short/Brief Note
Advertisements
Solution
i. {background-color: yellow;}
ii. h2 {display: block; font-color: Red ; margin-left: 25px;}shaalaa.com
Cascading Style Sheets in HTML
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
The ______ property is used to set the position for an element.
The float property defines the ______ of content.
A programmer wants to define range for age between 18 to 50, he will use a form with following appropriate control.
______ character is used to create an id in CSS.
Positioning types in CSS are ______
- Static
- fixed
- absolute
- position
- dynamic
- nested
What type of CSS is the following code snippet?
<h1 style="color:blue;">A Blue Heading</h1>"CSS is the most popular choice for the web developers these days". Write any four advantages of CSS.
Write an inline CSS code to set the background color for the first level heading as 'green' containing the text "My CA Exam".
- Write a CSS code to display the first level heading text as "My School" in Green color and center-aligned.
- Write the CSS code to display the following paragraph below the above-mentioned heading:
This is my School
I study in class 12
The properties of the paragraph content should be as follows:
(I) Text color should be yellow
(II) Font size should be 25 px
(III) Font style should be bold
- Assertion (A): CSS saves a lot of work. It can control the layout of multiple web pages all at once.
- Reason (R): All the required style settings can be stored in an external stylesheet and a link to it can be added in the <head> section of each web page.
