Image | Sololearn: Learn to code for FREE!
+ 2

Image

i have used the img tag and the result i see in the browser is a BIG and HORIZONTAL image. i have made it small thanks to width attribute BUT why is it horizontal in the browser??

15th Apr 2017, 3:40 PM
Abdul Kabeer Khan
Abdul Kabeer Khan - avatar
2 Answers
+ 5
If I quite understand your point, it's because <img> is an HTML inline tag, hence are placed next to each other horizontally. You can convert to blocks by nesting in <div> tag or use CSS and set display to inline-block or block.
15th Apr 2017, 4:00 PM
Benneth Yankey
Benneth Yankey - avatar
0
thanks Ben Bright 👍
15th Apr 2017, 4:02 PM
Abdul Kabeer Khan
Abdul Kabeer Khan - avatar