Sept07

<a href='https://baidu.com> this is a link</a> <br>
<p></p><br>
<h1></h1>...<h6></h6><br>
<hr>定义水平线</hr> <br>
<b>加粗</b><br>
<i>斜体</i><br>
<code>代码块</code><br>
<sub>下标</sub><br>
<sup>上标</sup><br>
<em>着重文字</em><br>
<small>定义小号字</small><br>
<strong>凸显语气</strong><br>
<ins>定义插入字</ins><br>
<del>定义删除字</del><br>

<a href='https://baidu.com target="_blank" id=tips> this is a link</a>
_blank可以在新的窗口打开 
 _parent可以在上一级的窗口打开 
1 _self可以在当前的窗口打开
1 _top可以在整个窗口打开

<br>
<a href="#tips">跳到id为tips的链接</a><br>

<head>
	<title>文档标题</title>
	<script></script>
	<style type="text/css"></style>
	<link>
	<base href="https://baidu.com">所有的链接标签的默认链接
</head>

<meta name="xxx" content=""xxx>30s刷新页面
<meta http-equiv="refresh" content=""30>
内联样式
<p style="color:blue;background-color:gray;margin-left;font-family:verdana;font-size:20px"	>段落字体颜色:蓝色,背景颜色:灰色,左外边距:20px,定义字体为:verdana,字体大小为20px</p><br>
<p style="text-align:center;">文本居中对齐</p>
<img src="xxx.png" alt="图片失效的说明文字" weight="302" height="270">
表格:
<table border="1">
<tr>
<th>表头</th>
</tr>
<tr>
<td></td>
</tr>
</table>

无序列表
<ul>
<li></li>
<li></li>
</ul>
有序列表
<ol>
<li></li>
<li></li>
</ol>
自定义列表
<dl>
<dt>coffee</dt>
<dd>- black hot drink</dd>
<dt>milk</dt>
<dd>- white cold drink</dd>
</dl>
块元素:<div></div>无特殊含义,用于组合其他html元素的容器
内联元素:<span></span>无特殊含义,用于设置字体属性
clear:both:清除浮动
float:left

例子:
<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>标题</title> 
</head>
<body>
 
<div id="container" style="width:500px">
 
    <div id="header" style="background-color:#FFA500;">
        <h1 style="margin-bottom:0;">主要的网页标题</h1>
    </div>
 
    <div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
        <b>菜单</b><br>
        HTML<br>
        CSS<br>
        JavaScript
    </div>
 
    <div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
        内容在这里
    </div>
 
    <div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
    </div>
 
</div>
 
</body>
</html>

表单:
<form>
文本域:
firstname:<input type="text" name="firstname"><br>
firstname:<input type="text" name="firstname"><br>
密码框:
passwd:<input type="password" name="pwd">
单选:
<input type="radio" name="sex" value="male">male<br>
<input type="radio" name="sex" value="female">female<br>
</form>:
复选框
<form>
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
<input type="checkbox" name="vehicle" value="Car">I have a car
</form>
提交按钮
<form name="input" action="xxx.html" method="get">
name:<input type="text" name="use">
<input type="submit" value="submit">
</form>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值