How to put an image in the middle position of my html web page | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to put an image in the middle position of my html web page

How to put an image in the middle/right/left position of my html web page? Kindly describe in details or upload a code so that I can understand at the prima facie. I am a beginner in coding community. So please cooperate. Thank you guys.

17th Jul 2018, 6:25 PM
Sumit Bikram Maity
Sumit Bikram Maity - avatar
3 Answers
0
<center> <img src="image.png"> </center> Very easy
17th Jul 2018, 7:21 PM
Dlite
Dlite - avatar
+ 2
Center tag is obsoleted since HTML4. You are discouraged to use center tag, cause it could be removed any time from browsers More info https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center You could center image of parent element using margin: auto xxpx;
18th Jul 2018, 2:27 AM
Calviղ
Calviղ - avatar
+ 1
Thanks.... It works.
17th Jul 2018, 7:25 PM
Sumit Bikram Maity
Sumit Bikram Maity - avatar