I'm taking two classes in college which seem to have decided to mix with each other. One is programming, and the other is Chinese. In the C++ class I'm learning to code in HTML, which led me to create a free website during my spare time. The bright idea of mine was to use some of the pinyin which I've been learning in school and applying it to my own webpage. You can check out the 'blog' here for fun. It's definitely not serious, and I'm aware there are a heavy level of grammar mistakes.
My question is for whether or not anyone knows how to implement a style of simplified Chinese for my website? I did some searching but I found myself to be quite confused in the end. I'm looking for some basic free HTML/CSS code that can be pasted into the code for each webpage, allowing me to simply output the pinyin in a certain stylized font.
If anyone knows how to go about doing this, I would be quite grateful. I'm also curious about the code which would allow for this. I really wanted to use a Google API, but they didn't seem to have any Chinese font for some reason.
If I understand your question correctly, you want to stylise how the Chinese characters appear on your web page right? An important point to note is that pinyin does not refer to Chinese characters but to their romanised form, for example: nĭ hăo is pinyin, 你好 is a set of two characters. To change the style you need to use CSS and font-family in the same way you would change the style of English text. Some options for Chinese standard web fonts are: SimSun, Microsoft Yahei, FangSong, KaiTi and others that can be found through Google. Good luck!