1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

HTML Spanish Characters

Discussion in 'Web Development' started by rafaelbolivar, May 5, 2010.

  1. rafaelbolivar

    rafaelbolivar New Member

    I downloaded the "Media" Web code and have been able to make the desired changes thus far.

    The following code was included in the CSS file to allow for multilingual site, but still, spanish characters are translated to funny symbols.

    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Could anyone help?

    Thanks

    Rafael
     
  2. rafaelbolivar

    rafaelbolivar New Member

    The following line of code took care of my problem

    charset=iso-8859-15
     
  3. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    The Declaration is for English and set for charset="utf-8" which is considered universal if your browser version supports it.
    <Language lang="EN">English</Language>

    The lang and xml:lang Attributes
    Using both the lang and xml:lang attributes when specifying the language of an element.
    The value of the xml:lang attribute takes precedence.

    Reference A Reformulation of HTML 4 in XML 1.0


    If you want Spanish then - <Language lang="SP">Spanish</Language>
    or
    If you want a combination of both you can leave it set to English and try to use the Unicode characters.
    But some may not work.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//[COLOR="Blue"]EN"[/COLOR]
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" [COLOR="#0000ff"]xml:lang="en" lang="en"[/COLOR]>
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
    	<title>Media</title>
    	<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
    	
    </head>