CodeFizz

A Free Learn-To-Code Website

CSS Syntax

No search results found.

🡹

Color

<style>
div {
color: blue;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Background

<style>
div {
color: white;
background: red;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Font-size

<style>
div {
font-size: 20px;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Width

<style>
div {
width: 200px;
background: lightblue;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Height

<style>
div {
height: 200px;
background: lightblue;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Float

<style>
div {
float: right;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Padding

<style>
div {
background: lightpink;
padding: 20px;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Margin

<style>
div {
background: lightpink;
margin: 20px;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Font-weight

<style>
div {
font-weight: bold;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Font-style

<style>
div {
font-style: italic;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Text-decoration

<style>
div {
text-decoration: underline overline;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Border-style

<style>
div {
border-style: solid;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Border-width

<style>
div {
border-style: solid;
border-width: 10px;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage


Border-color

<style>
div {
border-style: solid;
border-color: mediumpurple;
}
</style>
<div>Hello world!</div>
Try it »

Meaning and Usage