Inline style is used to apply a unique style for a single HTML element.
<h1 style="color: rgb(255, 58, 255)">Example of Inline Style</h1>
Internal style is used to apply a unique style for a single HTML page.
<style>
h2 {
color: rgb(255, 0, 0);
}
button {
color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);
}
</style>
External style is used to apply a unique style for a single HTML page.
<link rel="stylesheet" href="css/style.css" />
css/style.css
h3 {
color: rgb(255, 0, 0);
}
button {
color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);
}
JavaScript style is used to apply a unique style for a single HTML page.
<p id="js-styled-paragraph">JavaScript style is used to apply a unique style for a single HTML page./p>
<script>
document.getElementById("js-styled-paragraph").style.color = "green";
document.getElementById("js-styled-paragraph").style.fontSize = "18px";
</script>