Atributo accept-charset de HTML
The HTML accept-charset attribute specifies the character encoding that must be used for the form submission. See how to use it on the <form> element.
El atributo HTML accept-charset especifica la codificación de caracteres que debe utilizarse para el envío del formulario.
Puedes usar este atributo únicamente en el elemento <form>.
El valor del atributo contiene una lista separada por comas de una o más codificaciones. El valor predeterminado del atributo es “UNKNOWN”, lo que indica que la codificación es igual a la del documento que contiene el elemento <form>.
Sintaxis
Sintaxis del atributo HTML accept-charset
<form accept-charset="character_set"></form>Ejemplo del atributo HTML accept-charset:
Ejemplo del atributo HTML <span class="attribute">"accept-charset"</span>
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
input {
display: block;
margin-bottom: 10px;
}
</style>
</head>
<body>
<form action="/form/submit" accept-charset="ISO-8859-1" method="post">
<input type="text" name="name" placeholder="Enter your Name" />
<input type="text" name="surname" placeholder="Enter your Surname" />
<input type="number" name="age" placeholder="Enter your Age" />
<input type="submit" value="Send" />
</form>
</body>
</html>Practice
Práctica
¿Cuál es el atributo HTML 'accept-charset'?