{"id":100,"date":"2026-04-07T01:24:47","date_gmt":"2026-04-07T01:24:47","guid":{"rendered":"https:\/\/gigz.pk\/css\/?post_type=lesson&#038;p=100"},"modified":"2026-04-07T01:24:47","modified_gmt":"2026-04-07T01:24:47","slug":"borders-border-radius","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/","title":{"rendered":"Borders &#038; Border Radius"},"content":{"rendered":"\n<p>Borders are used in CSS to define the outline around an element. They help separate content, highlight sections, and improve the overall visual structure of a webpage. Border radius is used to create rounded corners, which gives a modern and smooth look to elements.<\/p>\n\n\n\n<p>Borders have three main properties: width, style, and color. These properties can be applied together or separately depending on the design requirement.<\/p>\n\n\n\n<p>The border width defines how thick the border appears. It can be set using values like thin, medium, thick, or specific units such as pixels.<\/p>\n\n\n\n<p>The border style determines the appearance of the border. Common styles include solid, dashed, dotted, double, and none.<\/p>\n\n\n\n<p>The border color sets the color of the border. It can be defined using color names, hex codes, RGB, or other color formats.<\/p>\n\n\n\n<p>Example of a simple border in CSS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.box {<br>  border: 2px solid blue;<br>}<\/pre>\n\n\n\n<p>You can also control each side of the border individually. This allows more flexibility when designing layouts.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.box {<br>  border-top: 2px solid red;<br>  border-right: 2px dashed green;<br>  border-bottom: 2px solid blue;<br>  border-left: 2px dotted black;<br>}<\/pre>\n\n\n\n<p>Border radius is used to round the corners of an element. It can be applied to all corners or specific corners.<\/p>\n\n\n\n<p>A basic example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.box {<br>  border: 2px solid black;<br>  border-radius: 10px;<br>}<\/pre>\n\n\n\n<p>This will create slightly rounded corners. Increasing the value will make the corners more curved.<\/p>\n\n\n\n<p>You can also create a perfect circle by setting the border radius to 50 percent, as long as the element has equal width and height.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.circle {<br>  width: 100px;<br>  height: 100px;<br>  border: 2px solid black;<br>  border-radius: 50%;<br>}<\/pre>\n\n\n\n<p>It is also possible to control each corner separately using properties like border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.box {<br>  border: 2px solid black;<br>  border-top-left-radius: 20px;<br>  border-bottom-right-radius: 20px;<br>}<\/pre>\n\n\n\n<p>Borders and border radius are essential tools in CSS for creating visually appealing and structured designs. They are commonly used in buttons, cards, images, and containers to improve user experience and layout clarity.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"menu_order":0,"template":"","class_list":["post-100","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Borders &amp; Border Radius - CSS learning mastery<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Borders &amp; Border Radius - CSS learning mastery\" \/>\n<meta property=\"og:description\" content=\"Borders are used in CSS to define the outline around an element. They help separate content, highlight sections, and improve the overall visual structure of a webpage. Border radius is used to create rounded corners, which gives a modern and smooth look to elements. Borders have three main properties: width, style, and color. These properties [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/\" \/>\n<meta property=\"og:site_name\" content=\"CSS learning mastery\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/borders-border-radius\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/borders-border-radius\\\/\",\"name\":\"Borders & Border Radius - CSS learning mastery\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/#website\"},\"datePublished\":\"2026-04-07T01:24:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/borders-border-radius\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/borders-border-radius\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/borders-border-radius\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/css\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Borders &#038; Border Radius\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/css\\\/\",\"name\":\"CSS learning mastery\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/css\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Borders & Border Radius - CSS learning mastery","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/","og_locale":"en_US","og_type":"article","og_title":"Borders & Border Radius - CSS learning mastery","og_description":"Borders are used in CSS to define the outline around an element. They help separate content, highlight sections, and improve the overall visual structure of a webpage. Border radius is used to create rounded corners, which gives a modern and smooth look to elements. Borders have three main properties: width, style, and color. These properties [&hellip;]","og_url":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/","og_site_name":"CSS learning mastery","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/","url":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/","name":"Borders & Border Radius - CSS learning mastery","isPartOf":{"@id":"https:\/\/gigz.pk\/css\/#website"},"datePublished":"2026-04-07T01:24:47+00:00","breadcrumb":{"@id":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/css\/lesson\/borders-border-radius\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/css\/"},{"@type":"ListItem","position":2,"name":"Borders &#038; Border Radius"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/css\/#website","url":"https:\/\/gigz.pk\/css\/","name":"CSS learning mastery","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/css\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/lesson\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/media?parent=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}