SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    May 2012
    Posts
    996
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post How do you start font ?

    Hi, I have question on the font, i was inspecting some website,some website start font size in body tag,..my question is what is the right way to use font size in the body tag also what unit should be use isn't percentage,em or rem ?, or how do you set up font size in the body tag ?


    Thank you in advance.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,600
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    The only reason for specifying a font size in the body tag is for antiquated long dead versions of Internet Explorer that didn't interpret em sizes properly without it. To cover for those browsers a font-size as a % needed to be specified - exactly what % you used didn't matter so 100% made the most sense although some people tended to use other percentages on the mistake assumption that by doing so they would somehow equate em with specific pixel sizes.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •