Introduction to CSS -Cheat Sheet
Nov 2, 2022
HTML Elements
Container Element
The HTML div element defines a container.
<div>
<h1>Your Heading</h1>
<p>this is the area you have to write your paragraph of text </p>
<button>Start Css</button>
</div>
CSS Properties
2. Syntax
selector {
property: Their value;
property: Their value;
}
3. Text Align
The CSS text-align property specifies the horizontal alignment of the text in an HTML element.
.div {
text-align: center;
color: black;
background-color: yellow
}