PX To EM Conversion

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

w3schools.

com
(//www.w3schools.com)
  HTML (/html/default.asp) CSS (/css/default.asp) MORE 
(/de
Play Now

Pixels to Ems Conversion


❮ Previous (ref_httpmethods.asp) Next ❯ (ref_keyboardshortcuts.asp)

The tool below allows you to work out the em sizes from pixels (or vice versa).

Pixel to Em Converter
Set a default pixel size for body (usually 16px)
Then, convert a pixel value to em, based on the default pixel size
Or, convert an em value to pixels, based on the default pixel size

Set a default pixel size:

16 px

Convert PX to EM: Convert EM to PX:


px em

 Convert

Result:
Body Font Size
In the table below, select a body font size in pixels (px) to display a complete "px to em and percent"
conversion table.

Tip: The default font size is usually 16px.

px em percent

5px 0.3125em 31.25%

6px 0.3750em 37.50%

7px 0.4375em 43.75%

8px 0.5000em 50.00%

9px 0.5625em 56.25%

10px 0.6250em 62.50%

11px 0.6875em 68.75%

12px 0.7500em 75.00%

13px 0.8125em 81.25%

14px 0.8750em 87.50%

15px 0.9375em 93.75%

16px 1.0000em 100.00%

17px 1.0625em 106.25%

18px 1.1250em 112.50%

19px 1.1875em 118.75%

20px 1.2500em 125.00%

21px 1.3125em 131.25%

22px 1.3750em 137.50%


23px 1.4375em 143.75%

24px 1.5000em 150.00%

25px 1.5625em 156.25%

What is the difference between PX, EM and Percent?

Pixel is a static measurement, while percent and EM are relative measurements. The size of an
EM or percent depends on its parent. If the text size of body is 16 pixels, then 150% or 1.5 EM will
be 24 pixels (1.5 * 16). Look at CSS Units (/cssref/css_units.asp) for more measurement units.

❮ Previous (ref_httpmethods.asp) Next ❯ (ref_keyboardshortcuts.asp)

Answer to win rewards

COLOR PICKER (/colors/colors_picker.asp)

(/colors/colors_picker.asp)

HOW TO
(/howto/default.asp)

Tabs
(/howto/howto_js_tabs.asp)
Dropdowns
(/howto/howto_css_dropdown.asp)
Accordions
(/howto/howto_js_accordion.asp)
Side Navigation
(/howto/howto_js_sidenav.asp)
Top Navigation
(/howto/howto_js_topnav.asp)
Modal Boxes
(/howto/howto_css_modals.asp)
Progress Bars
(/howto/howto_js_progressbar.asp)
Parallax
(/howto/howto_css_parallax.asp)
Login Form
(/howto/howto_css_login_form.asp)
HTML Includes
(/howto/howto_html_include.asp)
Google Maps
(/howto/howto_google_maps.asp)
Range Sliders
(/howto/howto_js_rangeslider.asp)
Tooltips
(/howto/howto_css_tooltip.asp)
Slideshow
(/howto/howto_js_slideshow.asp)
Filter List
(/howto/howto_js_filter_lists.asp)
Sort List
(/howto/howto_js_sort_list.asp)

SHARE

 (http://www.facebook.com/sharer.php?

u=https://www.w3schools.com/tags/ref_pxtoemconversion.asp)  (https://twitter.com/home?

status=Currently reading https://www.w3schools.com/tags/ref_pxtoemconversion.asp) 


(https://plus.google.com/share?url=https://www.w3schools.com/tags/ref_pxtoemconversion.asp)


CERTIFICATES (//www.w3schools.com/cert/default.asp)
HTML (/cert/cert_html.asp)
CSS (/cert/cert_css.asp)
JavaScript (/cert/cert_javascript.asp)
SQL (/cert/cert_sql.asp)
Python (/cert/cert_python.asp)
PHP (/cert/cert_php.asp)
jQuery (/cert/cert_jquery.asp)
Bootstrap (/cert/cert_bootstrap.asp)
XML (/cert/cert_xml.asp)

Read More » (//www.w3schools.com/cert/default.asp)


TRY OUT TANG PINEAPPLE LASSI!

REPORT ERROR

PRINT PAGE

FORUM (/forum/default.asp)

ABOUT (/about/default.asp)

Top Tutorials
HTML Tutorial (/html/default.asp)
CSS Tutorial (/css/default.asp)
JavaScript Tutorial (/js/default.asp)
How To Tutorial (/howto/default.asp)
SQL Tutorial (/sql/default.asp)
Python Tutorial (/python/default.asp)
W3.CSS Tutorial (/w3css/default.asp)
Bootstrap Tutorial (/bootstrap/bootstrap_ver.asp)
PHP 5 Tutorial (/php/default.asp)
PHP 7 Tutorial (/php7/default.asp)
jQuery Tutorial (/jquery/default.asp)
Java Tutorial (/java/default.asp)

Top References
HTML Reference (/tags/default.asp)
CSS Reference (/cssref/default.asp)
JavaScript Reference (/jsref/default.asp)
SQL Reference (/sql/sql_ref_keywords.asp)
Python Reference (/python/python_reference.asp)
W3.CSS Reference (/w3css/w3css_references.asp)
Bootstrap Reference (/bootstrap/bootstrap_ref_all_classes.asp)
PHP Reference (/php/php_ref_overview.asp)
HTML Colors (/colors/colors_names.asp)
jQuery Reference (/jquery/jquery_ref_overview.asp)
Angular Reference (/angular/angular_ref_directives.asp)
Java Reference (/java/java_ref_keywords.asp)
Top Examples
HTML Examples (/html/html_examples.asp)
CSS Examples (/css/css_examples.asp)
JavaScript Examples (/js/js_examples.asp)
How To Examples (/howto/default.asp)
SQL Examples (/sql/sql_examples.asp)
Python Examples (/python/python_examples.asp)
W3.CSS Examples (/w3css/w3css_examples.asp)
Bootstrap Examples (/bootstrap/bootstrap_examples.asp)
PHP Examples (/php/php_examples.asp)
jQuery Examples (/jquery/jquery_examples.asp)
Java Examples (/java/java_examples.asp)
XML Examples (/xml/xml_examples.asp)

Web Certificates
HTML Certificate (/cert/default.asp)
CSS Certificate (/cert/default.asp)
JavaScript Certificate (/cert/default.asp)
SQL Certificate (/cert/default.asp)
Python Certificate (/cert/default.asp)
jQuery Certificate (/cert/default.asp)
PHP Certificate (/cert/default.asp)
Bootstrap Certificate (/cert/default.asp)
XML Certificate (/cert/default.asp)

Get Certified » (//www.w3schools.com/cert/default.asp)

W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic
understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full
correctness of all content. While using this site, you agree to have read and accepted our terms of use
(/about/about_copyright.asp), cookie and privacy policy (/about/about_privacy.asp). Copyright 1999-2019
(/about/about_copyright.asp) by Refsnes Data. All Rights Reserved.
Powered by W3.CSS (//www.w3schools.com/w3css/).

(//www.w3schools.com)

You might also like