html基础知识

目录

文本相关 

 图片操作

 表格

表单 

css嵌入式  

选择器


文本相关 

标题

<h1>  </h1>

段落

<p> </p>

加粗

<b> </b>

 斜体

<i> </i>

下滑

<u> </u>

删除

<s> </s>

无序列表

  <ul>
 <li> </li>
 <li> </li>
  </ul>

有序列表

<ol>
<li> </li>
<li> </li>
</ol>

可以嵌套 

 图片操作

插入图片  百分比缩放是 相当于与网页

<img  width ="100" height="50%" src="地址">

访问上级 ../ 

页面内跳转   用 #加 id来跳转

<img id="top" src="地址">

<a href="#top">回到顶部</a>

 表格

表格 跨列

<tr> 
<!-表头-->
<th></th>
<td clospan="2"> </td>

</tr>

 跨  行

<tr>
<td roewspan="2" algin="center"> 内容</td>
<td></td>
</tr>
<tr>

<td></td>
</tr>

表单 

必须 加action  给你name 参数 

<form action="地址" method="get"> 
<input type="text" name="参数">
</form>

单选 作用域   必须加 value 否则提交的为 ON

<input type="radio"name="gender" value="M" id="r1">
<label for="r1">男</tabel>

多选

<input type="chexkbox" name="gender" >参数

下拉选项  默认参数 selected

<select>
<option>参数
<option selected>参数
<select>

提交 

<input type="submit" value="注册">

<!--重置按钮-->
<input type="reset">

<!--自定义按钮-->
<button type="button">按钮</button>

 默认最大长度

<input maxlengeth ="" type="radio" cherket>

css嵌入式  

内联式样式

<h1 style="color:参数"> 参数</h1>

内部

<head>

<style>
h2{color:参数}
</style>

</head>


<h1></h1>
<h1></h1>

嵌入式 

h3{color:参数}
<head>
<!--快捷键 link + tab -->
<link rel="stylesheet" href="地址">


</head>


<h1> 参数<h1>

选择器

选择整个 类型

<head>
<style>
h1{color:参数}
</style>

</head>
<h1></h1>

选择id

<head>

<style>
#p1{color:red}
</style>
</head>


<h1 id="p1"></h1>

归属到一个类

<head>

<style> 
<1--修改背景颜色-->
.c1{background-color:pink}
</style>
</head>
<div class="c1"></div>
<h1  calss="c1"  > </h1>

属性选择器

<input>[type='text']{bachgroud-color:red}

 任意元素选择器

*{ border:1px solid red}

分区标签

<div>  
<span>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值