Centering Text in HTML

I know at first this seems like a very stupid question, but I have a good reason for asking it. Even though I might just be misled. For EVER I have been using the `
Text
` tag to have text appear centered horizontally. Apparently this tag is depreciated, and is no longer used. So I have tried using `

Text

` although it seems to be buggy and I have read that It does not work in all browsers. On top of that, when I have a header `` tag within a `

` tag there is also a validation issue. The point is, I want to do this right, and although the center tag is tolerable, it is apparently not the best way to go. Why has it been depreciated? And what is your alternative? I honestly have no idea where to go from here. P.S. Asking this question kills me inside. EDIT:: Even while using the accepted answer;

I am not able to center `` tags within the `

` tags. I have tried and read that `` does not work in all browsers and I have tried applying the style to the header tag with no avail. What do you think? ----------
No actually an answer but you should check how to use CSS. It's the new black :)

以上就是Centering Text in HTML的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏