Jump to content

Image Centering in HTML

Recommended Posts

I'm kinda new to this, I've messed around with inspect element at school, but I'm trying to center an image in the body of my thing. I've tried class="center" and other things but none have worked. I looked at something saying to use CSS, but I'm confused on how to use it.

Link to post
Share on other sites

Hello, @eef freef

Please try this code,To Centering image using HTML:

<!DOCTYPE html>

<img src="smiley.gif" alt="Smiley face" width="42" height="42">
I hope above code will be useful for you.

Thank you.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...