Is using align = "center", a bad practice?

Hello sir/mam,

hey there, i am currently learning programming and i have a doubt.

Is using the align property in html a bad practice? for example, i have a div that has some text and using align = “center” in that a bad practice? should you do it with css like text-align = “center”?

just a simple question, is using align = “center” kinda bad practice for programmers i kinda feel more suitable with it but then i see the http://html5.validator.nu/ it is a html code validator, it said that instead of using align = “center”? make the alignment with CSS instead.

you would know this right cause many of you will be experienced programmers now.

Any replies would be grateful

Thank you :neutral_face:

1 Like

do you mean align="center" as attribute of the element?

yes, it is preferable to style an element using css instead of inline styling

1 Like

I guess that would be a best practice for all styling to be done in css instead of inline.
so not just for align=“center” but all styling in general.

Again its best practice and not a rule.

1 Like

Thanks a lot there!!

Thanks a lot sir!!!

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