Style Tags can be styled ๐
Tap into Style Tags' Benefits: Alter and Refine Them Conveniently in Your Browser

Search for a command to run...
Tap into Style Tags' Benefits: Alter and Refine Them Conveniently in Your Browser

No comments yet. Be the first to comment.
hi I'm building something and would love your honest take on it. It's an early MVP โ rough around the edges โ but the core idea is: what if anyone on your team could ask questions about your product r

I have an embarrassing habit. Every morning commute or during meetings, I have my best ideas. Product decisions I've been stuck on for days. Connections between problems I hadn't seen before. Thin

its been a while i used DEV, i transitioned to a PM and with the onset of AI i have been actually working to build of something of my own. and as a PM one of the many pains was to create a full fledge

Building something for the community ๐ก๐ check it out at : https://formifyai.stephinreji.com Lemme know your thoughts

Indeed, you heard correctly! Style tags are also considered HTML tags, to which we can apply various styles.
Let's explore this further.
Go to your Favourite editor and paste the following code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit CSS Live</title>
</head>
<body>
<style style="display: block;">
*{transition: all 0.2s;}
html{
background-color: #bada55;
font-size: 20px;
}
</style>
</body>
</html>
In the code provided above, I have included a style attribute within the style tag. Now, when you execute this code, the content inside the style tag will be displayed in the browser with the applied styling, as demonstrated below.

Cool right! but there is more.
What if I say you can edit the styles on the browser window ๐ณ.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style contenteditable style="display: block;">
*{transition: all 0.2s;}
html{
background-color: #bada55;
font-size: 20px;
}
</style>
</body>
</html>
There is an attribute called "contenteditable" that can be added to the style tag, allowing us to edit the styles directly from our browser window, as demonstrated below.
Try changing the background color and font size, and you'll see what I mean.
You can also add "white-space: pre;" alongside "contenteditable" to include the necessary whitespace wherever needed.
<style contenteditable style="display: block; white-space: pre;">
Hope this quick tutorial helped you in some or the other way. Thankyou