我们如何根据HTML中的周围元素设置对齐方式?

王林
王林 转载
2023-08-28 15:09:18 161浏览

我们如何根据HTML中的周围元素设置对齐方式?

注意 - HTML5 中不推荐使用align 属性。请改用 CSS。

示例

<!DOCTYPE html>
<html>
   <body>
      <p align="right">A right-aligned paragraph.</p>
      <p><b>Note:</b> The align attribute is not supported in HTML5. Use CSS instead.</p>
   </body>
</html>

以上就是我们如何根据HTML中的周围元素设置对齐方式?的详细内容,更多请关注php中文网其它相关文章!

声明:本文转载于:tutorialspoint,如有侵犯,请联系admin@php.cn删除