You can do this by giving the span a fixed width and height:

span p {
    margin: 0;
}

span {
    background-color: red;
    display: inline-block;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
}
<span>
    <p>25</p>
    <p>08</p>
</span>
Answer from GolezTrol on Stack Overflow
🌐
W3Schools
w3schools.com › css › css3_borders.asp
CSS Rounded Corners
To create elliptical corners, you ... (for a rectangular element), or to create a circular shape (for a square element) set border-radius to 50%....
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-radius
border-radius - CSS | MDN
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
🌐
HubSpot
blog.hubspot.com › website › css-border-radius-circle
How to Draw a Circle Using the CSS Border Radius Property
April 20, 2022 - Now that we understand some of ... using CSS. Add the HTML element. Assign it an equal width and height. Set the CSS border-radius property to 50%....
🌐
W3Schools
w3schools.com › howto › howto_css_circles.asp
How To Create Circles / Round Dots
<span class="dot"></span> <span class="dot"></span> <span class="dot"></span> <span class="dot"></span> To create a circle, use the border-radius property and set the value to 50%. Then combine the height and width properties with a matching value:
🌐
CSS-Tricks
css-tricks.com › almanac › properties › b › border-radius
border-radius | CSS-Tricks
November 10, 2022 - Here is the code: div { height:250px; width:250px; background-image:url(image.jpg);} .round { border-radius: 60px; /* Prevent background color leak outs / border: 20px solid rgb(18, 50, 51); border: 20px solid rgba(18, 50, 51, 0.9); -webkit-background-clip: padding-box;/ for Safari / -moz-border-radius:360px;/ Firefox – alte Syntax */ } ... Using percentages is perfect for a responsive CSS Circle, but having it break below iOS 5.0 is a problem I’m having.
🌐
Webdevworkshop
webdevworkshop.io › code › css-circles
Creating Circles with CSS
A value that uses any CSS length measurement, such as px, em, rem, vw, or vh. ... A percentage value. border-radius is a shorthand property for border-top-left-radius, border-top-right-radius, border-bottom-right, and border-bottom-left-radius properties, each of which can take one or two length or percentage values. It can get complicated, but fortunately you can ignore all that complication if all you want is a circle shape, because that only requires two things:
🌐
Learnsic
learnsic.com › blog › css3-circles-how-to-create-circles-using-css3-border-radius
How to Create Circles Using CSS3 Border-Radius
This website uses cookies to ensure you get the best experience & by continuing to use our website, you agree to our Privacy and Cookie Policy · Got it
Find elsewhere
🌐
GitHub
github.com › w3c › csswg-drafts › issues › 6467
[css-borders] `border-radius` with a circular edge · Issue #6467 · w3c/csswg-drafts
July 21, 2021 - #rect { border-radius: round; } 👍React with 👍6yisibl, marcobiedermann, danielturus, SebastianZ, simevidas and 1 more😄React with 😄1jonjohnjohnson🎉React with 🎉24colmtuite, mzaien, JReinhold, troglotit, benslv and 19 more · No one assigned · css-borders-4 ·
Published   Jul 21, 2021
🌐
Tailwind CSS
tailwindcss.com › docs › border-radius
border-radius - Borders - Tailwind CSS
Use utilities like rounded-s-md and rounded-se-xl to set the border radius using logical properties, which map to the appropriate corners based on the text direction:
🌐
WebFX
webfx.com › home › blog › web design › circular images with css
Circular Images with CSS - WebFX
.circular--square { border-top... 50%; border-bottom-left-radius: 50% 50%; } By setting all the border-radius properties to 50% of the width/height of the square img element, we end up shaping the img element into a ...
🌐
UnusedCSS
unused-css.com › blog › css-half-circle
CSS Half Circle | UnusedCSS
May 17, 2022 - What we need to do, alongside reducing the height to half, is to have a radius only for top corners. ... div { margin: 1rem auto; background-color: #48abe0; } .semi-circle { width: 20rem; height: 10rem; background-color: #48abe0; border-radius: 10rem 10rem 0 0; }
🌐
9elements
9elements.com › blog › css-border-radius-can-do-that
CSS Border-Radius Can Do That? - 9elements
Whenever you only use a single ... you can also use percentages. Those are mostly used to create a circle by setting border-radius to 50%. The percentage value is based on the width and height of the given element...
🌐
Cloud Four
cloudfour.com › thinks › css-circles
CSS Circles – Cloud Four
August 21, 2025 - ... The most common technique is to round all corners by 50%. This is the simplest to apply, and is very widely supported. The border-radius property will also affect borders, shadows and the element’s touch/click target size.
🌐
HTML Dog
htmldog.com › references › css › properties › border-radius
CSS Property: border-radius | HTML Dog
Specifies the radius of a quarter circle or ellipse that forms the corners of the outer-edge of the border area of a box.
🌐
W3Schools
w3schools.com › cssref › css3_pr_border-radius.php
CSS border-radius property
The border-radius property defines the radius of the element's corners. Tip: This property allows you to add rounded corners to elements! This property can have from one to four values.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-top-left-radius
border-top-left-radius - CSS | MDN
div { border-top-left-radius: 40px 20px; background-color: lightgreen; border: solid 1px black; width: 100px; height: 100px; } A square element with a single <percentage> value produces an arc of a circle.
🌐
EASEOUT
easeout.co › blog › 2022-12-26-css-border-radius
CSS Border Radius | EASEOUT
To create a circle, set the radius to a value that is equal to or larger than the width or height of the element. For example: .my-circle { width: 100px; height: 100px; border-radius: 50%; /* radius equal to half the width and height of the element */ }
🌐
Mimo
mimo.org › glossary › css › border-radius
CSS Border Radius: Rounded Corners for Stylish Elements
Similarly, you can round image elements with border-radius. By setting border-radius to 50%, you can make the image a perfect circle.