You have to add tag style and write inside it your @media css code, for example
<div>Element</div>
<style>
@media (max-width:360px){
div{
display: none;
}
}
</style>
You have to add tag style and write inside it your @media css code, for example
<div>Element</div>
<style>
@media (max-width:360px){
div{
display: none;
}
}
</style>
No.
The value of a style
attribute is equivalent to the body of a rule-set.
Rule-sets can go inside media queries. The reverse is not true.
I have a problem in which i need to use @media in html. You use @media in css but now i need to use it in html but i cannot find a way on how to do so.
I expect to change some styling
No, you can’t inline
use it in a
can’t use “id or class” therefore style won’t work
There are many selectors other than ID and class selectors. They can be combined in many ways. (And if you can change the HTML to add a style attribute then you should be able to add other data too).
No, you can’t. Just use a