Margins, borders and padding is a definition in typography, an art and technique of arranging type in order to make the language it forms most appealing to transparent learning and recognition.
The use of typography even dates back from 2nd millenium BC! Today typography is commonly found while browsing websites through a programming document called CSS (Cascading Style Sheets). In combination with HTML (Hypertext Markup Language), this new way of typography makes everyday websites look beautiful.
Like layers in an onion, margins, borders and paddings wrap around an object. They can also be manipulated to display various properties such as colors, radius, thickness etc.
Like the example above for margins, there are multiple ways to write margin in CSS. Lines 2-5 can be rewritten by line 6, using just the margin declaration and following the order of top, right, bottom, left. It can also be rewitten as line 7 which only declares two values, thus the values reflect equal sides, such as top-bottom and left-right. Finally if the value is equal on all sides, a shorthand method can just declare the value once. These rules also apply to borders and paddings.
About the Author
Hello, I'm Ronald Ishak, a tech entrepreneur, blogger, father, developer from Jakarta Indonesia. I use this blog to document what I learn. If it helps you, please consider leaving a comment or sharing it!