Answers for "html center a text"

CSS
9

html center text

<div style="text-align:center">Dieser Text wird zentriert.
<p>Ebenso dieser Paragraph.</p></div>
Posted by: Guest on July-02-2020
1

html css center text on page

<style>
body { background: white }
section {
  background: black;
  color: white;
  border-radius: 1em;
  padding: 1em;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-right: -50%;
  transform: translate(-50%, -50%)
  }
</style>

<section>
  <h1>Nicely centered</h1>
  <p>This text block is vertically centered.
  <p>Horizontally, too, if the window is wide enough.
</section>
Posted by: Guest on December-03-2020
0

center text in html

text-align: center;
Posted by: Guest on October-07-2020
2

how to center text in html

With the aid of internal or external CSS you can center text with:

text-align: center;
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language