CSS – Set Border Radius for Paragraph
To set a specific border radius for Paragraph element using CSS, set border-radius property with required value for the selected paragraph elements in styles(inline/external).
Example
In the following HTML script, we have set border radius for paragraphs with different values.
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
p {
border: 1px solid;
padding: 15px 0;
}
#p1 {
border-radius: 5px;
}
#p2 {
border-radius: 10px;
}
#p3 {
border-radius: 15px;
}
</style>
</head>
<body>
<p>Default paragraph.</p>
<p id="p1">Paragraph 1.</p>
<p id="p2">Paragraph 2.</p>
<p id="p3">Paragraph 3.</p>
</body>
</html>
Conclusion
In this CSS Tutorial, we learned how to set border radius for paragraph element(s) using CSS.