常用的html编辑器
- Adobe Dreamweaver
- Microsoft Expression Web
- CoffeeCup HTML Editor
html样式
1.外部样式
例如:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
2.内部样式
<head>
<style type="text/css">
body {background-color: red}
p {margin-left: 20px}
</style>
</head>
3.内嵌样式
<p style="color: red; margin-left: 20px"
>
This is a paragraph
</p>
标签 | 描述 |
---|---|
<style> | 定义样式定义。 |
<link> | 定义资源引用。 |
<div> | 定义文档中的节或区域(块级)。 |
<span> | 定义文档中的行内的小块或区域。 |
<font> | 规定文本的字体、字体尺寸、字体颜色。不赞成使用。请使用样式。 |
<basefont> | 定义基准字体。不赞成使用。请使用样式。 |
<center> | 对文本进行水平居中。不赞成使用。请使用样式。 |
1.图像作为链接
例子:
http://www.w3school.com.cn/tiy/t.asp?f=html_imglink
2.在新的窗口打开链接
例子:
http://www.w3school.com.cn/tiy/t.asp?f=html_link_target
3.定位到同一个页面的不同位置,类似于目录。
例子:
http://www.w3school.com.cn/tiy/t.asp?f=html_link_locations
html图像
1.图像标签(<img>)和源属性(src)
在html中,图像由<img>标签定义。语法定义:<img src = "url" />
2.替换文本属性(Alt)
<img src = "boat.gif" alt = "big boat">
在浏览器无法载入图像时,替换文本属性告诉读者她们失去的信息。此时,浏览器将显示这个替代性的文本而不是图像。
更多图片实例:
1.如何向 HTML 页面添加背景图片:http://www.w3school.com.cn/tiy/t.asp?f=html_backgroundimage
2.如何在文字中排列图像:http://www.w3school.com.cn/tiy/t.asp?f=html_image_align
3.如何使图片浮动至段落的左边或右边:http://www.w3school.com.cn/tiy/t.asp?f=html_image_float
4.如何为图片显示替换文本:http://www.w3school.com.cn/tiy/t.asp?f=html_image_alt
5.如何将图像作为一个链接:http://www.w3school.com.cn/tiy/t.asp?f=html_image_link
6.如何创建带有可供点击区域的图像地图。其中的每个区域都是一个超级链接:http://www.w3school.com.cn/tiy/t.asp?f=html_areamap
html表格