HTML5样式、链接和表格

xiaoxiao2021-02-28  108

-------------------siwuxie095

  

  

  

  

  

  

  

  

  

HTML5 样式

  

  

1、标签

  

<style>标签:样式定义

  

<link>标签:资源引用

  

  

  

2、属性

  

rel:用于指定当前文档与被链接文档的关系

  

type:用于指定类型

  

margin:指定元素的外边距

  

  

  

3、样式表插入的三种方法

  

1外部样式表

  

<linkrel="stylesheet"type="text/css"href="mystyle.css">

  

  

2内部样式表

  

<style type="text/css">

  

body {background-color: red}

p {margin-left: 20px}

  

</style>

  

  

3内联样式表

  

<pstyle="color: red">

  

  

  

  

  

HTML5 链接

  

  

1、链接数据

  

1文本链接

  

2图片链接

  

  

  

2、属性

  

href:指向另一个文档的链接

  

name:创建文档内的链接

  

  

  

3<img>标签属性

  

alt:替代文本

  

width:宽度

  

height:高度

  

  

  

  

  

HTML5 表格

  

  

标签

描述

<table>

定义表格

<caption>

定义表格标题

<th>

定义表格的表头

<tr>

定义表格的行

<td>

定义表格的单元

<thead>

定义表格的页眉

<tbody>

定义表格的主体

<tfoot>

定义表格的页脚

<col>

定义表格的列属性

  

  

  

  

  

  

  

  

  

【made by siwuxie095】

转载请注明原文地址: https://www.6miu.com/read-79131.html

最新回复(0)