CSS padding property syntax and examples

The CSS padding feature is a feature of CSS1 that is used to set the margins of the content of HTML elements.

The padding values of the elements are zero by default. For example, if the padding attribute of a paragraph element is not assigned a value, it may appear adjacent to other visual content since the inside margins are zero. The padding-top, padding-right, padding-bottom and padding-left properties can also be used to avoid this situation.

The CSS padding feature can be applied to all html elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.

Continue Reading

CSS margin property syntax and examples

CSS margin property the values of the outer edge of an element. The margin-top, margin-right, margin-bottom, and margin-left properties are used to set the margins separately.

 

css margin property

 

The margin property can be applied to all elements except the elements of the table type.

Continue Reading

CSS Definition, Syntax and Usage – What is CSS

CSS (Cascading Style Sheets) is a web technology used to format HTML elements. The syntax of this coding technique, which is very simple to use, consists of a selector and the brackets {} that define the properties of this selector. The syntax is shown as an example below.

body {
color:red;
margin:0;
padding:0;
}

Cascading Style Sheets is a markup language. The distinguishing feature of it from other programming languages is that it is not a standalone function.
Continue Reading

CSS Inheritance, inherit, initial and unset values

CSS Inheritance is one of the basic features of CSS. With this basic feature, the style applied to an element is also passed to its sub-elements. The main purpose of inheritance is undoubtedly to save developers from repetition of code. As a matter of fact, it would be very difficult to code font family, color, font size separately for each element.

Continue Reading