+ 4
Centering Image
How do you center an image in HTML? I tried a few different methods from tutorials and none worked :( Here's what I currently have: <img align = "middle" src Velvet_Vic.jpg height = "100px" width = "100px" />
7 ответов
+ 7
I made the changes and the image was centered- thanks Calvin!
+ 6
Autocorrect changed src to sex lol and the tutorial had middle oddly enough instead of the usual center. I will make those changes and see what happens though
+ 4
let's check your code...
+ 4
I posted the line of code pertaining to the image above in the edit!
+ 3
There are several errors,
Firstly you cannot align an image by setting align attribute on img tag, you need to set align attribute on img parent tag.
Secondly there is no align="middle", it should be align="center". Double-check your tutorials.
Thirdly the img link, sex Velvet_Vic.jpg is not the valid link, your img link should be in src attribute, please check your tutorials.
+ 2
Yeah it's much easier to help provide an answer when you post a code.
+ 2
<img align = "middle" src ="path" />