我有一些HTML:
<div align="center" style="border:1px solid red">
This is some text in a div element!
</div>
标签会改变文档的间距,因此我想使用标签来代替。
但是标签无法使内容居中:
<span style="border:1px solid red;align=center">
This is some text in a div element!
</span>
我该怎么修复这个问题?
编辑:
我的完整代码:
<html>
<body>
<p>This is a paragraph. This text has no alignment specified.</p>
<span style="border:1px solid red;text-align=center">
This is some text in a div element!
</span>
</body>
</html>