ASP.NET Web Forms > Label and Literal

CSS formatted text in ASP.NET Web Forms

How to write CSS formatted text on the web page?


In case we need to write CSS formatted text on the page, we can use this approach.

ASPX Page
<p><asp:Label ID="Label6" runat="server" Text="CSS Formatted text" ForeColor="Red" BackColor="Green" /></p> 

To write CSS formatted text on the web page, we can use asp:Label control and specify the CSS style using its properties. ForeColor, BackColor, Font and its sub properties are mainly used to display CSS formatted text on the web page. 

 Views: 1755 | Post Order: 9



Write for us






Hosting Recommendations