Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7955141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:38:41+00:00 2026-06-04T03:38:41+00:00

For example: <!doctype html> <html lang=zh-cn> <head> <style type=text/css> body { font-family: sans-serif; }

  • 0

For example:

<!doctype html>
<html lang="zh-cn">
    <head>
        <style type="text/css">
            body
            {
                font-family: sans-serif;
            }
        </style>
    </head>
    <body>
        <div>Test.</div>
    </body>
</html>

This HTML document display a font that is not my browsers sans-serif font. For me, it is SimSun.

<!doctype html>
<html>
    <head>
        <style type="text/css">
            body
            {
                font-family: sans-serif;
            }
        </style>
    </head>
    <body>
        <div>Test.</div>
    </body>
</html>

And this is normal.

It only affect the font in Google Chrome, I think it may be something to do with CSS property “-webkit-locale”.

Is this normal? How can I set the font for “sans-serif” so that the “lang” attribute doesn’t change the font?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:38:43+00:00Added an answer on June 4, 2026 at 3:38 am

    “In Chinese versions of Microsoft Windows XP and older, the default interface typefaces
    are seriffed (MingLiU and SimSun), which is inconsistent with the sans-serif styling
    use in most other (including East Asian) regions of the product.
    Starting in Windows Vista, the default interface typefaces in all regions were changed
    to sans-serif styles, using Microsoft JhengHei in Traditional Chinese environments
    and Microsoft YaHei in Simplified Chinese environments.”

    From Wikipedia.org
    http://en.wikipedia.org/wiki/East_Asian_sans-serif_typeface

    Solution:

    Use a different font style.
    Chinese and Western users will get different fonts, even though they have the same name.

    Alternatively, you could use the :lang(Lang-Code) rule to differentiate the font styles.
    Here’s an example:

    <!doctype html>
    <html>
        <head>
            <meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>
            <style type="text/css">
            body {
                font-family: "Times New Roman", serif;
            }
            :lang(zh-ch){
                font-family: SimSum-18030,SimHei, serif;
            }
            </style>
        </head>
        <body>
            <div lang="zh-ch">Chinese font </div>
            <div>Default font.</div> 
        </body>
    </html>
    

    Demo:
    http://jsfiddle.net/wCuND/

    More information here.

    http://www.w3.org/International/questions/qa-css-lang.en.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!DOCTYPE html> <html> <head> <style type=text/css> p.titletext { font-family:arial; font-size:50px; position:relative; left:425px; top:10px; }
<!doctype html> <html> <head> <title>JQuery Cycle Plugin - Example Slideshow</title> <style type=text/css> .slideshow {
I'll jump to an example. <!DOCTYPE html> <head> <title>Transposing div using CSS</title> <style> div#wrapper
See example: <!DOCTYPE html> <html> <head> <title>language</title> <script type=text/javascript src=http://www.google.com/jsapi> </script> </head> <body> <div
Example code: <html> <head> <script src=jquery-1.3.2.min.js type=text/javascript></script> <script src=jquery-ui-1.7.1.custom.min.js type=text/javascript></script> </head> <body> <table border=1
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> <html> <head> <style type=text/css> input {
The following Code <!DOCTYPE html> <html> <head> </head> <body> <div style=width:200px;height:200px;padding:0px;margin:0px;> <div style=background-color:red;position:relative;display:block;text-decoration:none;padding:0px;margin:0px;> <img
Example -- begin: index.html -- <!doctype html> <html> <head> <title>Index</title> <script type=text/javascript src=mootools.js></script> </head>
I have this basic example: <!doctype HTML> <html> <head> <script src=jquery-1.4.2.min.js type=text/javascript></script> <script> $(document).ready(function(){
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd> <html> <head> <script type=text/javascript> function init(){

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.