asked 178k views
0 votes
2. Write a program that outputs happy birthday in a different color​

1 Answer

2 votes

Answer:

I can provide you with the code for a simple HTML program that displays "Happy Birthday" in a different color. Here is the code:

```html

<!DOCTYPE html>

<html>

<head>

<title>Happy Birthday!</title>

<style>

#birthday {

color: blue;

}

</style>

</head>

<body>

<h1 id="birthday">Happy Birthday!</h1>

</body>

</html>

```

This program creates a simple HTML document with a heading element that displays "Happy Birthday!" in blue. You can open this code in a text editor and save it with a .html extension. Then, you can open the file in a web browser to see the result. You can also modify the color by changing the "color" property in the CSS style.

answered
User Pranjal Sahu
by
8.5k points

No related questions found