0

How can I align html contents at the center in different devices?

20th Oct 2020, 6:00 AM
Black Knight
Black Knight - avatar
4 Answers
+ 1
Hey, <center> tag is deprecated in HTML5.you can use css text-align:center property. <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <p>This text is aligned to the left.</p> <p style="text-align:center">And this one is placed in the center.</p> </body> </html> for different device you can use responsive web design using media query in css. refer following site: https://www.w3schools.com/css/css_rwd_mediaqueries.asp
20th Oct 2020, 7:08 AM
AjayGohil
+ 1
Use <Center> tag for all tje content in body tag
20th Oct 2020, 6:12 AM
UTKARSH
UTKARSH - avatar
+ 1
You can align with <center> element, float element, margin-right , margin-left elements... And much more you can use
20th Oct 2020, 6:18 AM
NOOR
NOOR - avatar
+ 1
Thank you so much guys â€ïžđŸ™đŸ™
20th Oct 2020, 8:53 AM
Black Knight
Black Knight - avatar