Computer Science, asked by suman2765, 6 months ago

Create a division using html and css with background color and text colour and write your name in it

Answers

Answered by Anonymous
0

<html>

<head></head>

<style>

div{color:green; background-color:yellow;}

</style>

<body>

<div><h1>Ankit Raj</h1></div>

</body>

</html>

Output: see the attachment

Attachments:
Answered by Anonymous
1

This means you need to use the style attribute in the opening tag you wish to add HTML color to. You may use the color property to change the color of your text, or background-color to change the color of the background. Both of these properties take color names, RGB, RGBA, HEX, HSL or HSLA values.

Similar questions