html入门实例代码2

2025-11-05 22:17:44

1、<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<body>

<h1 align="center">This is heading 1</h1>

上面的标题在页面中进行了居中排列。上面的标题在页面中进行了居中排列。上面的标题在页面中进行了居中排列。

</body>

</html>

2、<html>

<body>

hr 标签定义水平线:

<hr />

这是段落。

<hr />

这是段落。

<hr />

这是段落。

</body>

</html>

3、<html>

<body>

<!--这是一段注释。注释不会在浏览器中显示。-->

这是一段普通的段落。

</body>

</html>

4、<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<meta http-equiv="Content-Language" content="zh-cn" />

</head>

<body bgcolor="yellow">

<h2>请看: 改变了颜色的背景。</h2>

</body>

</html>

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
相关推荐
  • 阅读量:184
  • 阅读量:192
  • 阅读量:87
  • 阅读量:192
  • 阅读量:44
  • 猜你喜欢