-2
<section>
   <center>  
      <h1>
         Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
      </h1>
   </center>      
</section>

h1{
    color: purple;
    font-size: 30px;
    padding: 70px 70px 70px 70px;
}

enter image description here

This is what is looks like right now. I'm trying to get the text to be more centered and create margins on the side so it doesn't go from edge to edge. I thought padding did that, but I guess not. I appreciate any help!

1 Answers1

0

There are some issues with the HTML markup. There is no h11 tag in HTML maybe it's a typo. CSS stylings should be wrapped around <style></style> tags

Updated Code:

<section>
   <center>  
      <h1>
         Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
      </h1>
   </center>      
</section>

<style>
h1{
    color: purple;
    font-size: 30px;
    padding: 70px 70px 70px 70px;
}
</style>

Also, have a look at W3Schools website, there are plenty of HTML and CSS tutorials available.

https://www.w3schools.com/html/default.asp

yaqoob
  • 1,052
  • 3
  • 14
  • 39
  • Yes, I was using the header tag wrong. I changed it to a paragraph with a class and the padding worked correctly. I didn't have to wrap in in – Khaki Rock May 01 '22 at 18:45
  • `` tags are used for CSS. – yaqoob May 01 '22 at 18:47
  • oh I should have clarified, the CSS line is in it's own document. the first line of code is from the HTML document, the second one is from the CSS document. – Khaki Rock May 01 '22 at 18:50
  • Yes, but we can add CSS in the same html file using style tags. – yaqoob May 01 '22 at 18:51