While designing a webpage, the most important thing is to give colors to give colors to user controls. In HTML and ASP.NET we can fill colors by using CSS properties. "background-color:" is property to assign background color of a control. Like in given example we have three controls along with body of the page. every control including body have the background color using different methods. h2 have transparent color, by default controls have transparent background colors.
Source code How to Add BackGround Color Using CSS
<html>
<head>
<style type="text/css">
body {background-color: silver}
h1 {background-color: #00fff0}
h2 {background-color: transparent}
p {background-color: rgb(250,0,200)}
</style>
</head>
<body>
<h1>Header 1 (H1) Background color</h1>
<h2>Header 2 (H2) Background color</h2>
<p>Paragraph Background color</p>
</body>
</html>
No comments:
Post a Comment