Programming Code Center(PCC)
[CSS]

(PCC)::[how-to-use-class-selector-for-all-elements-in-html-using-css]::[css]

File Name : index.html

<!DOCTYPE html>
<html>
<head>
<style>
.center {
  text-align: center;
  color: red;
}
</style>
</head>
<body>

<h1 class="center">Red and center-aligned heading</h1>
<p class="center">Red and center-aligned paragraph.</p> 

</body>
</html>

Output :

Red and center-aligned heading

Red and center-aligned paragraph.