HTML style element
HTML style tag styles the content using CSS properties. CSS(Cascading Stylesheet Sheet) gives style to the sidebar, navbar and content.
<style type="text/css">
.div{
height:400px;
width:100%;
background-color:rgba(0,255,0,0.3);
border-left:2px solid green;
}
</style>
</>
i am a div element i am designed by the css given in the style tag.
my height is 400px.my color is light green and my border is green.
Tag omission
Both opening and closing tags are necessary for the style element.
Global Attributes
All the global attributes are applicable on the style element.
Next Previous
Was this article helpful?