Advertisements
Advertisements
प्रश्न
Ronaldo, a web designer in a start-up company, wants to give headings on a webpage through <h1> tag. Additionally, he wants to implement the following styles on all the <h1> tags of the same webpage in one go.
- Color-blue
- Background color-yellow
- border of the heading - 2px in red
He is not able to implement the above-mentioned additional styles <h1> of tag through regular HTML code. Suggest him a way out and also help him in writing the code for the same.
टीपा लिहा
Advertisements
उत्तर
Ronaldo should use CSS to implement extra styles in <h1> tag.
HTML Code:
<html>
<head>
<style>
h1 {color: blue;background-color:yellow;border: 2px solid red}
</style>
</head>
<body>
<h1>Welcome</h1>
</body>
</html>
<style> tag should be placed inside <head> tag of a webpage.shaalaa.com
Notes
½ Mark for the correct suggestion of usage of CSS.
2 Marks for correct CSS code and ½ Mark for using the internal style sheet.
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
