<!DOCTYPE html>
<html>
<head>
<title>My first website</title>
<meta charset="utf-8">
<style type="text/css">
div{
margin:0 auto;
}
</style>
</head>
<body>
<div>
<h1>My First Website</h1>
<p> Welcome to my webiste! Here are some things I enjoy.</p>
<ul>
<li>Web Development</li>
<li>Chess</li>
<li>Reading</li>
<li>Learning</li>
</ul>
<h2>Favorite Quotes</h2>
<blockquote>
<p>Here is a favorite quote of mine...</p><br>
<p> ...and another"</p>
</blockquote>
</div>
</body>
为什么这不起作用?我想将div中的所有内容都放置在页面的中心,当前它位于左侧。提前致谢。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句