Question

In: Computer Science

For the following style rules, what is the font size of the h1 heading in pixels?...

For the following style rules, what is the font size of the h1 heading in pixels?

body {font-size: 16px;}

body > article {font-size: 0.75em;}

body > article > h1 {font-size: 1.5em;}

  1. 16px;

  2. 12px;

  3. 18px;

  4. 18.25px;

Solutions

Expert Solution

Hello Student,

The correct answer is 18px.

-------------------------------------------------------------------------------------------------------------------------------------------------------

Explanation -

In CSS we define font size in many ways, here for h1 heading it is defined in format of em which is always relative to its parent font size.

Here we have:

Formula to convert em into px:

px(size of element in px) = em(size of same element in em) * px(size of parent in px)

Body font size = 16px

h1 font size = 1.5em

h1 heading font size = 0.75em

we have to convert this 0.75em into px.

So, the calculation is:

=> 16px * 1.5em = 24px (parent font size for h1 heading)

Thus, the h1 heading font size in pixel is

=> 24px * 0.75em = 18px

And not the other options like 16px, 12px ,18.25px.

---------------------------------------------------------------------------------------------------------------------------------------------------------

THANK YOU!

LIKE THE ANSWER IF IT HELPED YOU


Related Solutions

For h1 headings that are direct children of the nav element: Set the font-size to 1.2em,...
For h1 headings that are direct children of the nav element: Set the font-size to 1.2em, Set the font-color to white, Set the background-color to black, and Set the text-align property to center.
The following CSS code is embedded on a webpage: p { font-weight: bold; font-style: italic; }...
The following CSS code is embedded on a webpage: p { font-weight: bold; font-style: italic; } Which of the following statements is true when the above webpage is shown on a browser? Group of answer choices(A-D) a. All paragraphs are displayed in bold but not in italic, since the browser will only execute the first CSS rule and ignore all subsequent rules. B. All paragraphs are displayed in italic but not in bold, since the browser will only execute the...
Answer the following questions appropriately.For an image of size 16 x 16 pixels consisting of digits,...
Answer the following questions appropriately.For an image of size 16 x 16 pixels consisting of digits, i.e. each image is of a hand-written digit. Assume that there are as many hidden neuron in the only hidden layer as in the input layer. The output layer is used to predict the digit written in the impute image. The digit can be from 0 to 9. Answer the following questions:                              [5 x 4] What should be the number of neurons in output...
Consider an image of size 10,000-by-10,000 pixels that needs to be convolved with a filter of...
Consider an image of size 10,000-by-10,000 pixels that needs to be convolved with a filter of size 100-by-100. Comment about the most efficient method for convolving. Would it be convolution in spatial domain or Fourier?
Question 5 A government department is investigating whether the font style used on a website changes...
Question 5 A government department is investigating whether the font style used on a website changes the speed at which people read information. A sample of eight randomly selected participants are shown two website pages. The first website uses an Arial font style. The second uses a Verdana font style. The two pages have different text but contain the same number of words. The table below shows the length of time that each participant took to read the paragraph of...
Consider the following hypothesis test. H0:  = 20 H1:  ≠ 20 The sample size...
Consider the following hypothesis test. H0:  = 20 H1:  ≠ 20 The sample size is 200 and the standard deviation of the population is 10. Use a  = 0.05. What is the probability of making the Type II error if the real value of the population is: a. μ = 18.0 b. μ = 22.5 c. μ = 21.0
Use a style sheet to define the following rules and implement the given HTML code. Please...
Use a style sheet to define the following rules and implement the given HTML code. Please put your style information within the same file as the HTML code. Rules • Hyperlinks using the nodec class should display no decoration. • Hyperlinks should display text in white with a green background color when the mouse pointer is held over the link. (use the hover pseudo-class) • Unordered lists not nested within any other lists should be displayed in blue text and...
ESSAY: This essay has to be 2 pages and writen in font size 12. and another...
ESSAY: This essay has to be 2 pages and writen in font size 12. and another page is a brief outline and sources citation Topic; how integrity and individual decisions can affect other people, this topic can be refered from Sport area, Academic, Work experiences, Management
Present the six tasks below in 12-point font with particular attention given to APA style. Use...
Present the six tasks below in 12-point font with particular attention given to APA style. Use the terms between, among, and statistically significant carefully! Remember, the text PDF files contain APA examples. Using APA style, write a clear and concise sentence that presents the mean and standard deviation data from deliverable one. Deliverable 1 For each group listed in the table below, list the following (to two decimal places - e.g., 17.54) 1. Mean 2. Median 3. Mode 4. Standard...
Write a 6-7 page (single spacing, font size 12) formal report on following topic: 1. Investigative...
Write a 6-7 page (single spacing, font size 12) formal report on following topic: 1. Investigative or Recommendation Report: How has mobile teleworking affected employee productivity during the COVID-19 pandemic? (both individual and company productivity could be discussed) All of the above reports require a Title Page, Table of Contents, Introduction, Findings, Discussion and Conclusion; add subheadings are required. A separate Recommendations section is optional, depending on topic choice. Also, use a minimum of three outside sources and one graphic...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT