What is the CSS border-top-left-radius property?

The border-top-left-radius property in CSSCascade Style Sheets is used to set or define the radius of the top left corner of the border.

Syntax


border-top-left-radius: length|percentage [length|percentage]|initial|inherit;

Property values

  • length: Sets or defines the left-corner shape.

  • percentage: Writes the shape of the top left corner in percentage.

  • initial: Sets the value to its default value.

  • inherit: Inherits property from its parent value.

Code

The basic HTMLHyperText Markup Language & CSS code to demonstrate the use of the border-top-left-radius property is below.

Explanation

In this example, we make two boxes.

The corner of one box is round, and the corner of the second box is an elliptical shape.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources