Using the border Shorthand Properties

Shorthand properties set all three values(width, style, color) in one step.

PropertyDescriptionValues
borderSets the border for all edges. <width> <style> <color>
border-topSets the border for top edge. <width> <style> <color>
border-bottomSets the border for bottom edge. <width> <style> <color>
border-leftSets the border for left edge. <width> <style> <color>
border-rightSets the border for right edge. <width> <style> <color>
 
<!DOCTYPE HTML> 
<html> 
<head> 
<title>Example</title> 
<style type="text/css"> 
p { 
    border: medium solid black; 
    border-top: solid 10px; 
} 
    </style> 
</head> 
<body> 
    <p> 
            HyperText Markup Language (HTML) is the main markup language for 
            displaying web pages and other information that can be displayed 
            in a web browser(From From Wikipedia, the free encyclopedia).
    </p> 
</body> 
</html>
  
Click to view the demo
Home 
  HTML CSS Book 
    CSS  

Related: