Label:
- Label is used to display text on the web page.
- <asp:Label> renders the content inside <span>, if used AssociateControlID property then content will be rendered inside the <label>.
- As Label content/Text is rendering inside the html tag so it is very easy to identify in JAVASCRIPT or JQUERY and easy to apply CSS.
Literal:
- Literal is used add dynamic HTML content to the page.
- <Asp:Literal> renders the content/Text as it is i.e. Content will rendered directly not inside the any HTML tag.
- As Literal Content is not rendering inside any HTML tag, so it is unable to identify in JAVASCRIPT or in JQUERY.
By using Label also we can add HTML but for example if you’re adding <div> then div will rendered inside the <span>, according W3C standards it’s not correct HTML.