Yes, it is possible to apply the font shorthand to use the identical font as the h1 tag without reiterating the font size. Here is an example:
h1 {
font-family: Arial;
font-size: 36px;
font-weight: bold;
}
p {
font: bold Arial;
}
In the above code, the font
shorthand for the p
tag uses the same font family and weight as the h1
tag (Arial and bold), but does not include the font-size property. Therefore, the font size for the p
tag will inherit the font-size from its parent element or default to the browser’s default size.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-08-04 11:00:00 +0000
Seen: 10 times
Last updated: Jun 12 '21
What is the way to replace the default color of mui/material/Tab font (react)?
What does the error "Bar 0; array size is too large, maximum size is 100000" mean?
How can the text size of the plot be enlarged using ggcuminc?
How can I transfer the dimensions of a ChartArea from one PowerPoint chart to another?
The size of the plot returned by df.hist() is not the desired one.
How can I sort products that have the size attribute available in stock in Woocommerce?
What is the appropriate size for App store screenshots on a 6.5" display?
How to provide Arduino input parameters of any size without creating a struct?