em and rem

Report a typo

Consider the code below and answer two questions.

1) What is the font size enclosed in the <pre> tag in pixels?
2) What is the font size enclosed in the <span> tag in pixels?

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>em and rem</title>
  </head>
  <body>
     <pre>em <span>and</span> rem</pre>
  </body>
</html>
pre {
  font-size: 1em;
}

span {
  font-size: .5rem;
}

In the answer box, type two answers separated by a comma and a space. Example of the answer input: 23, 5.

Tip: Keep in mind the difference between em and rem, and remember the default font size in browsers.

Enter a short text
___

Create a free account to access the full topic