Hi KatieNgoc,
CssClass and Class properties are used to apply any CSS class to the controls or elements.
But the only difference is class property is used for HTML controls while CssClass property is used for Server controls.
It is not necessary to use CssClass property for Server controls, you can use class property aswell.
While CssClass is rendered on page it will rendered as class in HTML as in the below example span element.
Example:
<style type="text/css">
.myStyle
{
color: Red;
}
</style>
<asp:Label ID="Label1" runat="server" CssClass="myStyle" Text="Welcome To ASPSnippets.com" />
<br />
<span class="myStyle">Welcome To ASPSnippets.com</span>
<br />
<asp:Label runat="server" class="myStyle" Text="Welcome To ASPForums.Net" />
Output
Welcome To ASPSnippets.com
Welcome To ASPSnippets.com
Welcome To ASPForums.net