时间:2021-07-01 10:21:17 帮助过:36人阅读
1 2 DOCTYPE html> 3 <html> 4 5 <head> 6 7 <meta http-equiv="Content-Type" content="text/html; charset=gb2312或utf-8或gbk" /> 8 9 <meta http-equiv="refresh" content="10;URL=http://www.leixuesong.cn" /> 10 11 <title>网页标题title> 12 <meta name="keywords" content="PHP程序员,技术博客,个人博客" /> 13 <meta name="description" content="我的博客记录了Linux学习,PHP开发与编程,Web前端开发,MySQL学习和教程,NoSQL数据库教程以及个人的人生经历和观点。" /> 14 <link rel="stylesheet" type="text/css" href="main.css" /> 15 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">script> 16 head> 17 18 <body> 19 body> 20 html>
<a href="指向的链接地址或者网址#ID名" target="_blank|_self|_top|_parent">百度a>
<a href="http://www.yahoo.com" target="_self" title="去美国雅虎">雅虎a>
<a href="http://www.microsoft.com"><imgborder="0" src="1.jpg"/>a>
<img src="../images/csharp1.jpg" /> <img src="/images/csharp1.jpg" />
注意图片是链接的,不是插入的,所以如果src指向的文件不存在了,就看不了了。alt属性为图片无法显示时的显示文本,鼠标方式去也会有悬浮提示“点击查看大图”;title用来显示当鼠标放到图片上时显示的文字;border属性指定边框,border="0"不显示边框;width、height属性指定图片的显示大小,如果不指定则是图片的原始大小。
<img src="图片地址" alt="替换文本,图片打不开的时候显示" width="图片宽度" height="高度" border="0" />
<audio src="someaudio.wav">您的浏览器不支持 audio 标签。audio>
<video src="movie.ogg" controls="controls">您的浏览器不支持 video 标签。video>
<ul> <li>HTMLli> <li>JSli> <li>PHPli> ul>
<ol> <li>HTMLli> <li>JSli> <li>PHPli> ol>
<dl> <dt>计算机dt> <dd>用来计算的仪器 ... ...dd> dl>
1 <table width="100%" height="193" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000" bgcolor="#000000" background=""> 2 <tr> 3 <th>标题th> 4 <th>标题th> 5 tr> 6 <tr> 7 8 <td colspan="2" nowrap="nowrap"> td> 9 tr> 10 <tr> 11 <td>td> 12 13 <td rowspan="2"> td> 14 tr> 15 <tr> 16 <td height="16"> td> 17 tr> 18 table>
<form id="form1" name="form1" method="post|get" enctype="multipart/form-data" action="提交到的地址">form>
1 <input name="userName" type="text" maxlength="5" size="100" value="asdfasdfasfd" /> 2 3 <input name="pwd" type="password" maxlength="5" size="100" value="" /> 4 5 <input type="file" name="file" /> 6 7 <input type="hidden" name="country" value="China" /> 8 9 <input type="submit" name="Submit" value="提交" disabled="disabled" /> 10 11 <input type="reset" name="Submit2" value="重置" /> 12 13 <input name="sex" type="radio" value="1" />男 14 <input name="sex" type="radio" value="2" checked="checked" />女 15 16 <input name="skill" type="checkbox" value="1" checked="checked" />PHP 17 <input name="skill" type="checkbox" value="2" />前端 18 <input name="skill" type="checkbox" value="2" />数据库
注:checked=”checked”可以简写成checked
label标签为input元素定义标注,如果您点击label元素文本,就会触发此input控件。
textarea标签,设置文本区内的可见行数和宽度
禁止拉伸属性:style="resize:none"
<textarea name="content" cols="30" rows="10">大段文本输入框textarea>
1 2 <button type="submit" value="提交">提交button> 3 4 <button type="reset" value="重置">重置button>
1 2 <select name="user"> 3 <option value="1">rayoption> 4 <option value="2" selected="selected">raykaesooption> 5 select> 6 7 <select name="user" size="10" multiple="multiple"> 8 <option value="1">雷雪松option> 9 <option value="2" selected="selected">rayoption> 10 <option value="3">raykaesooption> 11 select>
注:selected=”selected”可简写成selected,表示选中
1 DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 6 <title>Examplestitle> 7 <meta name="description" content=""> 8 <meta name="keywords" content=""> 9 <link href="" rel="stylesheet"> 10 head> 11 <body> 12 <form method="POST" action="1.php" enctype="multipart/form-data"> 13 <table border="1" bordercolor="#F4F4F4" width="560" align="center" cellpadding="5" rules="all"> 14 <caption>个人中心caption> 15 <tr bgcolor="#F9F9F9"> 16 <td colspan="3"><b>1.会员登录名和密码b>td> 17 tr> 18 <tr> 19 <td align="right">用户名:td> 20 <td><input type="text" name="username" maxlength="15" disabled="disabled" value="Admin">td> 21 <td><input type="submit" value="检测用户名"><font color="#0E9EFF" size="1"> 5-15位font>td> 22 tr> 23 <tr> 24 <td align="right">密码:td> 25 <td><input type="password" name="password" maxlength="15">td> 26 <td><font color="#0E9EFF" size="1"> 密码5-15位font>td> 27 tr> 28 <tr> 29 <td align="right">确认密码:td> 30 <td><input type="password" name="repassword" maxlength="15">td> 31 <td><font color="#0E9EFF" size="1"> 必须与密码一致font>td> 32 tr> 33 <tr bgcolor="#F9F9F9"> 34 <td colspan="3"><b>2.基本信息b>td> 35 tr> 36 <tr> 37 <td align="right">性别:td> 38 <td><input type="radio" name="sex" value="man" checked="checked">男<input type="radio" name="sex" value="woman">女td> 39 tr> 40 <tr> 41 <td align="right">爱好:td> 42 <td> 43 <input type="checkbox" name="like[]" value="游戏" checked="checked" />游戏 44 <input type="checkbox" name="like[]" value="杀人" />杀人 45 <input type="checkbox" name="like[]" value="放火" />放火 46 <input type="checkbox" name="like[]" value="看书" />看书<br> 52 td> 53 <td>td> 54 tr> 55 <tr> 56 <td align="right">学历:td> 57 <td> 58 <select name="edu"> 59 <option value="小学">小学option> 60 <option value="初中">初中option> 61 <option value="高中">高中option> 62 <option value="大学" selected="selected">大学option> 63 <option value="研究生">研究生option> 64 select> 65 td> 66 <td>td> 67 tr> 68 <tr bgcolor="#F9F9F9"> 69 <td colspan="3"><b>3.自我介绍b>td> 70 tr> 71 <tr> 72 <td algi="right">个性签名:td> 73 <td><textarea name="qianming" cols="40" rows="10" style="resize:none" >textarea>td> 74 <td>td> 75 tr> 76 <tr> 77 <td align="right">上传头像:td> 78 <td> 79 <input type="file" name="touxiang"> 80 <input type="hidden" name="uid" value="90"> 81 td> 82 <td>td> 83 tr> 84 <tr> 85 <td colspan="3" align