Los caracteres que se tienen que escapar en HTML y CSS

El artículo Using character escapes in markup and CSS del W3C explica los caracteres que se deben escapar en las páginas web:

Syntax characters. There are three characters that should always appear in content as escapes, so that they do not interact with the syntax of the markup. These are part of the language for all documents based on HTML and for XML.

&lt; (<)

&gt; (>)

&amp; (&)

You may also want to represent the double-quote (“) as &quot; and the single quote (‘) as &apos;. This would certainly be the case in attribute text when you need to use the same type of quotes as those that surround the attribute value.

melonstube

El caracter “mayor que” ( ) en HTML indica que se cierra una etiqueta y puede dar problemas en navegadores antiguos, por lo que se aconseja escribir la entidad de caracter gt;, aunque su uso no es incorrecto (las paginas son validas).

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

This site uses Akismet to reduce spam. Learn how your comment data is processed.