100 bytes of CSS to look great everywhere

Minimal CSS snippet to make an HTML page look good.

No wonder that @swyx's tweet got more than 1500 likes. This is the snippet (visit the linked website for detailed explanation) :

html {
	  max-width: 70ch;
	  padding: 3em 1em;
	  margin: auto;
	  line-height: 1.75;
	  font-size: 1.25em;
}
h1,h2,h3,h4,h5,h6 {
	  margin: 3em 0 1em;
}
	
p,ul,ol {
 margin-bottom: 2em;
 color: #1d1d1d;
 font-family: sans-serif;
}

Go to the linked site

Tags: #css
Nov 2021, 12.

 

My next events:
🗓 Oct 05 17:00 Jumpstart your Java applications with AWS Lambda and Micronaut