Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Beginning HTML and CSS Introduction to HTML and the Portfolio Project

What do I code to make websites in Japanese?

I am thinking of making a website in Japanese.

However, after coding, I realized that Japanese words do not show right on the website.

How can I have Japanese words to be displayed on my website with Html?

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Edward,

A quick google search tells me that the charset for Japanese characters is as follows

<meta http-equiv="Content-Type" content="text/html; charset=x-euc">

http://a4esl.org/c/charset.html

But it might even work if you just use the universal charset which is utf-8. :) Good luck

Hi Edward,

Using meta with charset utf-8 works for me with hiragana, katakana, and kanji. I just tried and was able to preview it on chrome, safari, and firefox.

When I did types the html tags in japanese language, for me it didn't register the tag and actually displayed the tags along with the content. Making the html tags in english settings fixed it.

I also discover that some text-editor may require to define the setting as utf-8 when saving files for it to work. Maybe some simple text editor may just save as it is.

<html lang="jp">
<head>
    <meta charset="UTF-8">
    <script>
      alert("危ない!");
    </script>
</head>
<body>
  <h1> 日本語でウエブサイトです</h1>
  <p>
    このサイトは日本語で。はい、そのことはできますよ!ねねすごいじゃない?
  </p>
</body>
<html>

Adding the 'jp' language in your html tag should let screenreader and adaptive technologies its in Japanese :). Good luck.

Fridrik Juliusson
Fridrik Juliusson
12,113 Points

I know this question is old, but I came across this while looking for something completely different. Just wanted to confirm that this answer is correct for any future users. I work as a web dev in Japan and using UTF-8 character encoding is the way to go.

And yes, as mentioned in the answer, you cannot use Japanese versions of brackets, quote marks etc in your code. They are technically different characters and will not be recognized as their English counterparts.

For example: <a> is not the same as <a>.