<div class='animated'>animated</div> <style> @keyframes why { 0% { color: red; } 100% { color: blue; } } .animated { animation: why 2s; } </style>