HTML Charset

HTMLWeb DevelopmentFront End Technology

Different charsets include ASCII, ANSI, ISO-8859-1, UTF-8, etc. ISO-8859-1 supports 256 different character codes. ASCII defined 128 different alphanumeric characters. The charset attribute in HTML is used with the <meta> to specify the character encoding.

Following is the syntax −

<meta charset="char_set">

Above, char_set is the character set to specify the character encoding of an HTML document. 

Let us now see an example to implement HTML character encoding −


 Live Demo

<!DOCTYPE html>
<meta charset="UTF-8">
<p>We have added demo text −</p>
   <textarea rows="4" cols="50">
   Here, we are mentioned the demo content. This is just to display an example of charset in an HTML document.
   <button type="button">Previous</button>
   <button type="button">Next</button>


Updated on 30-Jul-2019 22:30:26