Your Search Results


    « SVG Attribute reference home

    The font-size attribute refers to the size of the font from baseline to baseline when multiple lines of text are set solid in a multiline layout environment. For SVG, if a <length> is provided without a unit identifier (e.g., an unqualified number such as 128), the browser processes the <length> as a height value in the current user coordinate system.

    If a <length> is provided with one of the unit identifiers (e.g., 12pt or 10%), then the browser converts the <length> into a corresponding value in the current user coordinate system

    As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet, see css font-size for further information.

    Usage context

    Categories Presentation attribute
    Value <absolute-size> | <relative-size> | <length> | <percentage> | inherit
    Initial value medium
    Animatable Yes
    Normative document SVG 1.1 (2nd Edition)


    font size with pixel


    h1 {font-size:30px;}
    h2 {font-size:20px;}
    p {font-size:15px;}



    font size with Em


    h1 {font-size:2.9em;}
    h2 {font-size:1.9em;}
    p {font-size:0.9em;} 




    The following elements can use the font-size attribute

    See also

    Document Tags and Contributors

    Contributors to this page: dhaval, Jeremie
    Last updated by: dhaval,