Reputation: 15889
I used to just align="left"
an img
inside p
tags before but align
is not supported anymore in HTML5.
What's the recommended way of doing the code below in HTML5?
<p>
<img src="https://placehold.it/50x50" align="left">
some long text
</p>
Upvotes: 0
Views: 276
Reputation: 10834
You can use
p img{
float: left;
}
This rule will apply on all images under <p>
p img{
float: left;
}
<p>
<img src="https://fakeimg.pl/30x30/?text=A"/>
some long text
</p>
Upvotes: 1