<style> h1#demo { font-size: 60px; background: -webkit-linear-gradient(top, #DDD 30%,#000 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } </style> <h1 id="demo"> Example</h1>