13. Aligning the Text


On the HTML Basics II of HTML & CSS, there's a part that says that you can align the text to the left, right, and center of the page. I understand that very clearly. My only question is: Can you align images so that it can be moved to the center of the page, too? If so, please explain this to me and provide the code as well. Thank you.

Replace this line with your code.



You can move your image any where!

(Now its (align attribute) not supported in html5, but you can use CSS to do it)


Thanks for helping me again, greentreemee.:slight_smile:


i actually advise against using this attribute, see w3 - aligment, the align attribute is depracated. If you are not familiar with w3, please do (link)

w3schools is in NO WAY related to W3C

Instead, give the parent element of the image a text-align: center using the style attribute


W3c is huge and probably complex for new comers whilst
W3schools and MDN is easy to read and go.
Again It(w3schools) did mentioned to avoid using it as img attribute.
I'll be mentioning w3c now on as It's more accurate and updated on regular basis! :thumbsup:


then use MDN, they are more to up to date then w3schools.

which is not enough? a deprecated attribute shouldn't be used at all


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.