Learn how to add gradient text to your website using only HTML and CSS
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hello</h1>
</body>
</html>
CSS
body{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: black;
}
h1{
font-size: 104px;
text-transform: uppercase;
background: -webkit-linear-gradient(left, #fc4a1a, #f7b733);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
If you found this blog post helpful don’t forget to check out my other projects and if you want more content follow me on
YouTube: https://www.youtube.com/channel/UC2nxqB2usQIS2c8zwVZKWEQ
Instagram: https://www.instagram.com/coding_for_the_web/
Twitter: https://twitter.com/LearnWebCoding
Comments