The global structure of an HTML 5 document.
πThe <!DOCTYPE html> declaration defines that this document is an HTML5 document.
πThe <html> element is the root element of an HTML page.
πThe <head> element contains meta information about the HTML page.
πThe <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab).
πThe <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
πThe <h1> element defines a large heading
πThe <p> element defines a paragraph
@html_css_tut
"w3schools .com"
πThe <!DOCTYPE html> declaration defines that this document is an HTML5 document.
πThe <html> element is the root element of an HTML page.
πThe <head> element contains meta information about the HTML page.
πThe <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab).
πThe <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
πThe <h1> element defines a large heading
πThe <p> element defines a paragraph
@html_css_tut
"w3schools .com"
CSS Box Model
πAll HTML elements can be considered as boxes.
πIn CSS, the term "box model" is used when talking about design and layout.
The CSS box model is essentially a box that wraps around every HTML element.
π It consists of: margins, borders, padding, and the actual content.
@html_css_tut
"w3schools .com"
πAll HTML elements can be considered as boxes.
πIn CSS, the term "box model" is used when talking about design and layout.
The CSS box model is essentially a box that wraps around every HTML element.
π It consists of: margins, borders, padding, and the actual content.
@html_css_tut
"w3schools .com"
πContent - The content of the box, where text and images appear
πPadding - Clears an area around the content. The padding is transparent
πBorder - A border that goes around the padding and content
πMargin - Clears an area outside the border. The margin is transparent
@html_css_tut
"w3schools .com"
πPadding - Clears an area around the content. The padding is transparent
πBorder - A border that goes around the padding and content
πMargin - Clears an area outside the border. The margin is transparent
@html_css_tut
"w3schools .com"
πCSS Border Style
The border-style property specifies what kind of border to display.
πCSS Border Color
The border-color property is used to set the color of the four borders.
π CSS Border Width
The border-width property specifies the width of the four borders.
Example:
-----------------------------------
p {
border-style: dotted;
border-width: 5px;
border-color: #0f0;
}
div {
border-style: solid;
border-width: 2px;
border-color: red;
}
-----------------------------------
@html_css_tut
"w3schools .com"
The border-style property specifies what kind of border to display.
πCSS Border Color
The border-color property is used to set the color of the four borders.
π CSS Border Width
The border-width property specifies the width of the four borders.
Example:
-----------------------------------
p {
border-style: dotted;
border-width: 5px;
border-color: #0f0;
}
div {
border-style: solid;
border-width: 2px;
border-color: red;
}
-----------------------------------
@html_css_tut
"w3schools .com"
CSS border-radius
The border-radius property defines the radius of the element's corners.
Tip: This property allows you to add rounded corners to elements!
Example:
-----------------------------------
p {
border-radius: 20px 60px 40px 80px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
The border-radius property defines the radius of the element's corners.
Tip: This property allows you to add rounded corners to elements!
Example:
-----------------------------------
p {
border-radius: 20px 60px 40px 80px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
πCSS Padding
The CSS padding properties are used to generate space around an element's content, inside of any defined borders.
πWith CSS, you have full control over the padding. There are properties for setting the padding for each side of an element (top, right, bottom, and left).
Example:
-----------------------------------
p {
padding-top: 20px;
padding-right: 10px;
padding-bottom: 5px;
padding-left: 25px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
The CSS padding properties are used to generate space around an element's content, inside of any defined borders.
πWith CSS, you have full control over the padding. There are properties for setting the padding for each side of an element (top, right, bottom, and left).
Example:
-----------------------------------
p {
padding-top: 20px;
padding-right: 10px;
padding-bottom: 5px;
padding-left: 25px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
πCSS Margins
πThe CSS margin properties are used to create space around elements, outside of any defined borders.
With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left).
Example:
-----------------------------------
p {
padding-top: 30px;
padding-right: 30px;
padding-bottom: 30px;
padding-left: 30px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
πThe CSS margin properties are used to create space around elements, outside of any defined borders.
With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left).
Example:
-----------------------------------
p {
padding-top: 30px;
padding-right: 30px;
padding-bottom: 30px;
padding-left: 30px;
}
-----------------------------------
@html_css_tut
"w3schools .com"
π Margin - Shorthand Property
πTo shorten the code, it is possible to specify all the margin properties in one property.
The margin property is a shorthand property for the following individual margin properties:
πmargin-top
πmargin-right
πmargin-bottom
πmargin-left
@html_css_tut
"w3schools .com"
πTo shorten the code, it is possible to specify all the margin properties in one property.
The margin property is a shorthand property for the following individual margin properties:
πmargin-top
πmargin-right
πmargin-bottom
πmargin-left
@html_css_tut
"w3schools .com"
πPadding - Shorthand Property
πTo shorten the code, it is possible to specify all the padding properties in one property.
The padding property is a shorthand property for the following individual padding properties:
πpadding-top
πpadding-right
πpadding-bottom
πpadding-left
@html_css_tut
"w3schools .com"
πTo shorten the code, it is possible to specify all the padding properties in one property.
The padding property is a shorthand property for the following individual padding properties:
πpadding-top
πpadding-right
πpadding-bottom
πpadding-left
@html_css_tut
"w3schools .com"
πCSS Border - Shorthand Property
To shorten the code, it is also possible to specify all the individual border properties in one property.
The border property is a shorthand property for the following individual border properties:
πborder-width
πborder-style
πborder-color
@html_css_tut
"w3schools .com"
To shorten the code, it is also possible to specify all the individual border properties in one property.
The border property is a shorthand property for the following individual border properties:
πborder-width
πborder-style
πborder-color
@html_css_tut
"w3schools .com"
CSS box-shadow
πThe box-shadow
CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
@html_css_tut
"developer. mozilla. org"
πThe box-shadow
CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
@html_css_tut
"developer. mozilla. org"
CSS Text Shadow
πThe text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its decorations. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color.
@html_css_tut
"developer. mozilla. org"
πThe text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its decorations. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color.
@html_css_tut
"developer. mozilla. org"
CSS Border Image
πThe CSS border-image property allows you to specify an image to be used instead of the normal border around an element.
@html_css_tut
"w3schools .com"
πThe CSS border-image property allows you to specify an image to be used instead of the normal border around an element.
@html_css_tut
"w3schools .com"
CSS Border Image
πThe CSS border-image property has three parts:
#1. The image to use as the border.
#2. Where to slice the image.
#3. Define whether the middle sections should be repeated or stretched.
@html_css_tut
"w3schools .com"
πThe CSS border-image property has three parts:
#1. The image to use as the border.
#2. Where to slice the image.
#3. Define whether the middle sections should be repeated or stretched.
@html_css_tut
"w3schools .com"