学习HTML做的一些记录
以下所有内容均来自于 W3school
- 标题
1 | <h1>This is a heading</h1> |
- 段落
1 | <p>This is a paragraph.</p> |
- 链接
1 | <a href="http://wanpiqiu123.github.io">This is a link</a> |
- 图像
1 | <img src="hello.jpg" width="233" height="233" /> |
- 水平线
1 | <hr/> |
- 换行
1 | <br/> |
- 注释
1 | <!-- This is a comment --> |
- 样式
1 | <h2 style="background-color:red">This is a heading</h2> |
- 格式化
1 | <b>This text is bold</b> |
- 预格式文本
1 | <pre> |
- 缩写
1 | <abbr title="etcetera">etc.</abbr> 缩写 |
- 文字方向
1 | <bdo dir="rtl"> |
这个可以让文字从右到左输出
- 邮件
1 | Written by <a href="mailto:mailadress@example.com">Leo</a>. |
- 删除线/下划线
1 | <p>一打有 <del>二十</del> <ins>十二</ins> 件。</p> |
- 引用
1 | <blockquote> |
- 锚
1 | <a name="tips">显示的文字</a> |
- 图片位置相关
1 | <p>图像 <img src="example.jpg" align="bottom"> 底部对齐文字底部</p> |
- 表格
- 水平表头
1 | <table border="1"> |
- 垂直表头
1 | <table border="1"> |
- 空表元素
1 | <table border="1"> |
- 添加标题
1 | <table> |
- 添加单元格边距
1 | <table border="1" |
- 添加单元格间距
1 | <table border="1" |
- 单元格背景图片
1 | <table border="1" |
- 单个单元格背景
1 | <table border="1"> |
- 表格内对齐
1 | <table width="400" border="1"> |
- 表格边框
1 | <table frame="box"> 方框 |
- 列表
- 无序列表
1 | <ul> |
- 有序列表
1 | <ol> |
- 定义列表
1 | <dl> |
- 嵌套列表
1 | <ul> |