{"id":8869,"date":"2015-09-15T18:32:42","date_gmt":"2015-09-15T21:32:42","guid":{"rendered":"https:\/\/king.host\/blog\/?p=8869"},"modified":"2024-06-04T08:02:42","modified_gmt":"2024-06-04T11:02:42","slug":"tutorial-caracteres-especiais-e-a-meta-tag-charset-no-html","status":"publish","type":"post","link":"https:\/\/king.host\/blog\/tutoriais\/tutorial-caracteres-especiais-e-a-meta-tag-charset-no-html\/","title":{"rendered":"Tutorial &#8211; Caracteres Especiais e a Meta Tag Charset no HTML"},"content":{"rendered":"<blockquote><p>\u00c9 normal se deparar&nbsp;com caracteres estranhos, como \u00c3\u00a9, \u00c3\u00a3o ou &nbsp;\u00c3\u00aa, ao escrever um texto em um ambiente online. Uma forma&nbsp;de&nbsp;resolver esse problema \u00e9 utilizar as listas de caracteres especiais ou, ainda melhor, declarar a meta tag&nbsp;charset no seu c\u00f3digo.<\/p><\/blockquote>\n<p>Se voc\u00ea utiliza um gerenciador de conte\u00fados para atualizar seu site\/blog, isso provavelmente n\u00e3o ser\u00e1 problema. Por\u00e9m, para quem est\u00e1 desenvolvendo ou precisa fazer atualiza\u00e7\u00f5es direto no c\u00f3digo da p\u00e1gina \u00e9 preciso utilizar c\u00f3digos especiais para cada tipo de s\u00edmbolo ou resolver esse problema declarando a meta tag charset.<\/p>\n<p>Essas solu\u00e7\u00f5es foram desenvolvidas para lidar com as limita\u00e7\u00f5es do HTML, que foi inicialmente desenvolvido para atender a l\u00edngua Inglesa. Esse idioma n\u00e3o utiliza acentos, como o agudo, o circunflexo, a crase ou outros que o Portugu\u00eas utiliza. O mesmo acontece se levarmos em conta outras l\u00ednguas como o Chin\u00eas, Russo, Mandarim, etc.<\/p>\n<p>Como alternativa, o HTML foi se adaptando e permitindo que sequ\u00eancias de escape representassem acentos e outros caracteres especiais. Essas sequ\u00eancias especiais possuem tr\u00eas partes: um &amp; inicial, um n\u00famero ou ordem de caracteres que correspondem ao caracter desejado, e um ; final. Outra forma de utilizar os acentos e s\u00edmbolos sem se preocupar \u00e9 atrav\u00e9s da meta tag charset.<\/p>\n<h3>Charset: o que \u00e9 e como&nbsp;utilizar<\/h3>\n<p>Atrav\u00e9s da meta tag charset, voc\u00ea informa ao browser qual o tipo de codifica\u00e7\u00e3o de caracteres deve ser utilizado para mostrar seu conte\u00fado. O utf-8 \u00e9 um padr\u00e3o de codifica\u00e7\u00e3o Unicode bastante utilizado. Este padr\u00e3o representa qualquer car\u00e1cter universal no padr\u00e3o do Unicode, sendo inclusive compat\u00edvel com o ASCII.<\/p>\n<p>Por exemplo, para definir o utf-8, usamos a seguinte sintaxe: <strong>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=utf-8&#8243;&gt;<\/strong><code><\/code><\/p>\n<h3>Algumas tabelas para o uso de caracteres especiais<\/h3>\n<p>Os tr\u00eas caracteres \u2018&lt;\u2019, \u2018&gt;\u2019, e \u2018&amp;\u2019 t\u00eam significados especiais em HTML, eles s\u00e3o utilizados no c\u00f3digo dos documentos. Para utiliz\u00e1-los no texto, utilize&nbsp;as seguintes entidades:<\/p>\n<table style=\"height: 194px;\" width=\"239\">\n<tbody>\n<tr>\n<td><strong>Entidade<\/strong><\/td>\n<td><strong>Car\u00e1cter<\/strong><\/td>\n<\/tr>\n<tr>\n<td>&amp;lt;<\/td>\n<td>&lt;<\/td>\n<\/tr>\n<tr>\n<td>&amp;gt;<\/td>\n<td>&gt;<\/td>\n<\/tr>\n<tr>\n<td>&amp;amp;<\/td>\n<td>&amp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Lista com acentos e s\u00edmbolos:<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00c1 &#8230;&#8230;&#8230;&#8230;.. &amp;Aacute;<\/span><span style=\"font-weight: 400;\">\u00e1 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;aacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c2 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;Acirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e2 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;acirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c0 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;Agrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e0 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;agrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c5 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;Aring;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e5 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;aring;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c3 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Atilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e3 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;atilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c4 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;Auml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e4 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;auml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c6 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;AElig;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e6 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;aelig;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c9 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Eacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e9 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;eacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ca &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;Ecirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ea &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;ecirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c8 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Egrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e8 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;egrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00cb &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;Euml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00eb &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;euml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d0 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. &amp;ETH;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f0 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;eth;<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u00cd &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Iacute;<\/span><span style=\"font-weight: 400;\">\u00ed &#8230;&#8230;&#8230;&#8230;&#8230; &amp;iacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ce &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;Icirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ee &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;icirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00cc &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Igrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ec &#8230;&#8230;&#8230;&#8230;&#8230; &amp;igrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00cf &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;Iuml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00ef &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;iuml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d3 &#8230;&#8230;&#8230;.. &amp;Oacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f3 &#8230;&#8230;&#8230;&#8230;.. &amp;oacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d4 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Ocirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f4 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;ocirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d2 &#8230;&#8230;&#8230;&#8230;.. &amp;Ograve;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f2 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;ograve;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d8 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Oslash;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f8 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;oslash;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d5 &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Otilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f5 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;otilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d6 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; &amp;Ouml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f6 &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;ouml;<\/span><\/td>\n<td><span style=\"font-weight: 400;\">\u00da &#8230;&#8230;&#8230;&#8230;.. &amp;Uacute;<\/span><span style=\"font-weight: 400;\">\u00fa &#8230;&#8230;&#8230;&#8230;&#8230; &amp;uacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00db &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;Ucirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00fb &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;ucirc;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d9 &#8230;&#8230;&#8230;&#8230;. &amp;Ugrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f9 &#8230;&#8230;&#8230;&#8230;.. &amp;ugrave;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00dc &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;Uuml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00fc &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;uuml;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c7 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;Ccedil;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00e7 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;ccedil;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00d1 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;Ntilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00f1 &#8230;&#8230;&#8230;&#8230;&#8230; &amp;ntilde;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&lt; &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;lt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&gt; &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&amp; &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;amp;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8221; &#8230;&#8230;&#8230;&#8230;&#8230;.. &amp;quot;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00dd &#8230;&#8230;&#8230;&#8230; &amp;Yacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00fd &#8230;&#8230;&#8230;&#8230; &amp;yacute;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00de &#8230;&#8230;&#8230;&#8230;.. &amp;THORN;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00fe &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;thorn;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00df &#8230;&#8230;&#8230;&#8230;&#8230;. &amp;szlig;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Lista com s\u00edmbolos&nbsp;comerciais:<\/p>\n<table style=\"height: 498px;\" width=\"286\">\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00a9<\/span><\/td>\n<td><span style=\"font-weight: 400;\">copyright<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;copy;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00ae<\/span><\/td>\n<td><span style=\"font-weight: 400;\">marca registrada<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;reg<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u2122<\/span><\/td>\n<td><span style=\"font-weight: 400;\">trade mark<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;trade;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00a3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">libra esterlina<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;pound;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00a2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">centavo<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;cent;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u20ac<\/span><\/td>\n<td><span style=\"font-weight: 400;\">euro<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;euro;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00a5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">iene (yen)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;yen;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u00a4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">s\u00edmbolo monet\u00e1rio<\/span><\/td>\n<td><span style=\"font-weight: 400;\">&amp;curren;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00c9 normal se deparar&nbsp;com caracteres estranhos, como \u00c3\u00a9, \u00c3\u00a3o ou &nbsp;\u00c3\u00aa, ao escrever um texto em um ambiente online. Uma forma&nbsp;de&nbsp;resolver esse problema \u00e9 utilizar as listas de caracteres especiais ou, ainda melhor, declarar a meta tag&nbsp;charset no seu c\u00f3digo. Se voc\u00ea utiliza um gerenciador de conte\u00fados para atualizar seu site\/blog, isso provavelmente n\u00e3o ser\u00e1 [&hellip;]<\/p>\n","protected":false},"author":253,"featured_media":8871,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[156],"tags":[1376],"class_list":["post-8869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutoriais","tag-desenvolvimento"],"_links":{"self":[{"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/posts\/8869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/users\/253"}],"replies":[{"embeddable":true,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/comments?post=8869"}],"version-history":[{"count":1,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/posts\/8869\/revisions"}],"predecessor-version":[{"id":31865,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/posts\/8869\/revisions\/31865"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/media\/8871"}],"wp:attachment":[{"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/media?parent=8869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/categories?post=8869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/king.host\/blog\/wp-json\/wp\/v2\/tags?post=8869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}