To change font family of text in paragraph using CSS, you can set the font-family
style property for the paragraph elements with the values like cursive
, Tahoma
, fantasy
, etc.
The following is the typical CSS code to change font family of text in paragraph in HTML page using tag name p
.
p {
font-family: cursive;
}
p {
font-family: Tahoma;
}
p {
font-family: fantasy;
}
We shall go through some working examples on how to change font family of text in paragraph using CSS. In the following examples, you may change the value of font-family and Run the code to visually observe the changes made to the Paragraph elements.
This is an example on how to change font family of text in paragraph using cursive style font.
You may edit the following code, and click on Run button.
This is an example on how to change font family of text in paragraph using Tahoma font family.
You may edit the following code, and click on Run button.
This is an example on how to change font family of text in paragraph using fantasy font.
You may edit the following code, and click on Run button.