How to make font bold and larger in css

王林
Release: 2020-11-17 14:48:25
Original
8691 people have browsed it

How to bold and enlarge the font in css: You can use the font-weight attribute, such as [font-weight: bold;]. The font-weight attribute is used to set the thickness of the text, and bold is used to define bold characters.

How to make font bold and larger in css

Related attributes:

font-weight attribute sets the thickness of the text

(Learning video sharing: css Video tutorial)

Attribute value:

  • normal Default value. Defines standard characters.

  • #bold Defines bold characters.

  • #bolder Defines bolder characters.

  • #lighter Defines finer characters.

  • #inherit Specifies that the font weight should be inherited from the parent element.

Code example:

<html>
<head>
<style type="text/css">
p.normal {font-weight: normal}
p.thick {font-weight: bold;font-size:250%;}
p.thicker {font-weight: 900;font-size:200%;}
</style>
</head>

<body>
<p class="normal">This is a paragraph</p>

<p class="thick">This is a paragraph</p>

<p class="thicker">This is a paragraph</p>
</body>

</html>
Copy after login

Achievement effect:

How to make font bold and larger in css

Related recommendations: CSS Tutorial

The above is the detailed content of How to make font bold and larger in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template