Comment Comment by jebronie <button onclick="window.location.href='https://example.com';">I'm a button with a link</button> This code from the demo shows, why not using classes to style a website is a misguided idea.Maybe something like this would be a better idea if you absolutely must avoid classes:https://jsfiddle.net/qa2cdj4v/ <strong><a href="#">Button</a></strong> strong > a:first-child:last-child { display: inline-block; background: red; color: white; padding: 10px; font-weight: normal; } parent jebronie 4 years ago
Maybe something like this would be a better idea if you absolutely must avoid classes:
https://jsfiddle.net/qa2cdj4v/