HTML CSS Exercise: Create a border image With CSS3
Solution:
HTML Code:
<!doctype html>
<html>
<head>
<title>HTML CSS Exercise - Border image with with CSS3</title>
<style type="text/css">
.border-around{
text-align:center;
padding:20px;
width:340px;
margin: 0 auto;
/* Set the border and border image properties */
border:50px solid transparent;
border-image:url(https://www.w3resource.com/html-css-exercise/border.png) 50 50 round;
}
</style>
</head>
<body>
<p class="border-around">This is an example of how to use css3 border image</p>
</body>
</html>
Live Demo :
See the Pen border-image-with-css3-answer by w3resource (@w3resource) on CodePen.
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join