-1

I'm trying to add text to the side of an image (more of an oval) in HTML, does anyone know how?

Picture to add text

bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • 1
    Welcome to Stack Overflow. Please edit the question to include a [*"Minimal, Reproducible, Example."*](https://stackoverflow.com/help/minimal-reproducible-example) – bad_coder Feb 11 '22 at 22:04

2 Answers2

0

If you put text inside a element it will be on the same line (inline).

<div> 
    <img src="img.png" />
    <span>your text here</span>
<div>

If you'd like to center your text to the left, a simple CSS flex box solution would be:

div {
  display: flex;
  align-items: center;
}

   span {
  padding: 15px;
}
Kevin
  • 51
  • 4
0
<div>
   <Img src='' style='float:left' />
   <span>Some text</span>
</div>
Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
LOGIC12
  • 41
  • 2
  • 8