Reputation: 985
Is there a way to increase the size of icon below.I tried with size attribute but not working
<span style="color:red">🛈</span>
Upvotes: 0
Views: 5454
Reputation: 392
The best way to achieve this is to nest a span like this:
<span style="color:red">sdsd <span style="font-size:36px">🛈</span></span>
Nesting spans is valid, see this question:
Can you have a <span> within a <span>?
Upvotes: 0
Reputation: 5677
If you only want to increase the size of the icon then you can wrap it in another span
element and set a bigger font-size
for this element only :
.icon {
font-size: 30px;
}
<span style="color:red">sdsd <span class="icon">🛈</span></span>
Upvotes: 0
Reputation: 54212
well, as mentioned in comment, it's actually a text, therefore you can use CSS font-size
attribute to increase the size of icon. Also, you missed a ;
.
<span style="color:red; font-size: 80px">🛈</span>
Upvotes: 2