HTML 基础和元素

来源:互联网 发布:澳门4g网络制式频段 编辑:程序博客网 时间:2024/05/23 18:37

HTML 标题

HTML 标题(Heading)是通过 <h1> - <h6> 等标签进行定义的。

实例

<h1>This is a heading</h1><h2>This is a heading</h2><h3>This is a heading</h3>


HTML 段落

HTML 段落是通过 <p> 标签进行定义的。

实例

<p>This is a paragraph.</p><p>This is another paragraph.</p>

HTML 链接

HTML 链接是通过 <a> 标签进行定义的。

实例

<a href="http://www.w3school.com.cn">This is a link</a>


注释:在 href 属性中指定链接的地址。

(您将在本教程稍后的章节中学习更多有关属性的知识)。

HTML 图像

HTML 图像是通过 <img> 标签进行定义的。

实例

<img src="w3school.jpg" width="104" height="142" />


注释:图像的名称和尺寸是以属性的形式提供的。

HTML 属性小测试:

<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 align="center"><font color="red">请看: 改变了颜色的背景。</font></h2></body></html>

0 0
原创粉丝点击