I know there seem to be a lot of questions like this, but I can't find one that matches my problem.
Even the w3schools example for centering text doesn't centre the text, (in Chrome Version 88.0.4324.104 (Official Build) (64-bit) and in Edge Version 88.0.705.50 (Official build) (64-bit)), even on the w3schools website itself. The text stays ranged left.
The code from the site is:
<!DOCTYPE html>
<html>
<head>
<style>
.center {
margin: auto;
width: 60%;
border: 3px solid #73AD21;
padding: 10px;
}
</style>
</head>
<body>
<h2>Center Align Elements</h2>
<p>To horizontally center a block element (like div), use margin: auto;</p>
<div class="center">
<p>Hello World!</p>
</div>
</body>
</html>
So how do I centre text, if I can't even get the w3schools example to work?
Thanks.