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:
🗓 Jul 20 09:00 Workshop Security in the Micronaut Framework
🗓 Sep 20 09:00 JCON Online 2022 - Getting Started with the Micronaut Framework
🗓 Sep 23 09:00 JCON Online 2022 - Micronaut® Framework and Microstream Java-native persistence engine