CSS Selector

Element Selector

CSS Element Selector

The element selector selects the HTML element by name.

Syntax:

element name{
property : value;
}

For example:

<!DOCTYPE html>
<html>
<head>
<style>
p{
text-align: center;
color: blue;
}
</style>
</head>
<body>
<p>This style will be applied on every paragraph.</p>
<p>And me!</p>
</body>
</html>

Cristle Academy

Compiler