Tips on adding Japanese to your own web pages.
If you have experience developing English pages and would like to include some Japanese text, you need a text or html editor or a web page design tool that supports Japanese. Full-featured editors like Dreamweaver support Japanese, but I use BBedit from BareBones Software a text editor optimized for web development, with Japanese support. For other web page editors that can handle Japanese, see the list of unicode savvy Mac web page editors on the Yale Chinese Mac page.)
Now here are just a few tips to get you past some sticking points.
<meta http-equiv="Content-type" content="text/html; charset=shift_jis"> . The most common flavor of unicode encoding is indicated with charset=utf-8.lang="en" or lang="ja" attribute to the <html> tag at the start of the file. On a page that is mostly English, you can also specify that one portion is Japanese by adding the lang attribute to a particular element, like this: <p lang="ja">. You can also add it to the span and div elements to designate smaller or larger sections of Japanese text.
If you are teacher, you may be interested in how to display ruby or furigana over Chinese characters on your web pages. Many recent browsers, like Safari 5 and Google Chrome, can display Ruby. And Firefox can display it with a plugin. (Details are on the browsers page.) Simple Ruby markup looks like this:
<ruby>
<rb>日本語</rb>
<rt>にほんご</rt>
</ruby>
The <rb> tag is for "ruby body,", and the <rt> tags are for "ruby text." To make the pronunciation display more nicely in browsers that don't support ruby, you can add <rp> "ruby parentheses" tags like this.
<ruby>
<rb>日本語</rb>
<rp>(</rp> <rt>にほんご</rt> <rp>)</rp>
</ruby>
For detailed information, see the Ruby Annotation Specification at the World Wide Web Consortium.
The most common character encoding for Japanese web pages is Shift JIS, but Unicode also has a number of advantages. (If you don't know what an encoding is, see the Encoding section of this site.)
è and ç. Otherwise these characters will not display correctly in shift-jis.
@charset "iso-8859-1"Back to Christopher Bolton's Home Page