Hello, I'm making a website in Portuguese and I'm trying to find the correct declaration for the charset.
I know for xhtml documents i should use
Code:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
But i read somewhere that i need to change the charset to ISO-8859-1, which is for Latin languages, including Portuguese.
But i'm not sure as formats are different and i have always used UTF-8
So my question is, should i use this code?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-BR" xml:lang="pt-BR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Or this one?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-BR" xml:lang="pt-BR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Help is really appreciated.
Thanks in advance.
Gaston