Issue
I have this code, i want to change the body color, how can i do that?
<html>
<head>
<title>Body bgcolor Attribute example</title>
</head>
<body>
<h1>This webpage has colored background.</h1>
</body>
</html>
Solution
I suggest you do some research about basic css.
You can achieve that with this.
<html>
<head>
<style>
body {
background: red;
}
</style>
<title>Body bgcolor Attribute example</title>
</head>
<body>
<h1>This webpage has colored background.</h1>
</body>
</html>
Notice that, There is a style tag before the title. You can style your HTML with CSS. Style tag contains your CSS code. Also, you can write your CSS in another file.
Answered By - Muhammedogz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.