<center>
This text will be centered.
<p>So will this paragraph.</p>
</center>`<center>` HTML centered text element / notebook
`<center>` HTML centered text element
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div class="center">
This text will be centered.
<p>So will this paragraph.</p>
</div>.center {
text-align: center;
}<p class="center">
This line will be centered.<br />
And so will this line.
</p>.center {
text-align: center;
}