How to chane the color of Label?

User Name:
Password :

I want to change the color for the label User Name and Password. Bydefault it is black. How to chnage these label colors?

Ans:-

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
border-style: solid;
border-width: 1px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellspacing="1" class="style1">
<tr>
<td style="color:Red">
UserName</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td style="color:Blue">
PassWord</td>
<td >
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

No comments:

Post a Comment

Plz Share your comments...