HTML基础

HTML(Hyper Text Markup Language)是超文本标记语言,网页访问

主体框架

<html>

<head>
<title>hello world</title>
</head>
<body> hello world </body> </html>

 

属性

bgcolor        背景颜色
text          字体颜色
background    背景插入图片

<body bgcolor='11ffff'>test</body>

 

标签

<p> </p>        段落标签
<br/>        换行标签
<pre> </pre>    预格式化标签

<ul>
<li> </li>
</ul>        无序标签

<ou>
<li> </li>
</ou>        有序标签

<dl>
<dt> </dt>
<dd> </dd>
</dl>        目录标签


<h1> </h1>    标题标签

 

字体修改

<b></b>        加粗
<u></u>        下划线
<i></i>        倾斜

<font size='20px' color='11fffff'></font>  更改字体大小颜色

 

超链接标签<a>

<a href='http://www.baidu.com'>baidu</a>

属性target

_blank    新窗口打开
_self    本窗口打开

属性name

<a name='123'>123</a>  设置锚点
<a href='123'>test</a>

 

图像标签

属性src

<img src='https://test'>    引入图片

属性height、width、align、border(高、宽、位置、边框)

<img width='50px' height='50px' align='center' src='https://test'>

 

表格标签

<table border='1'>
<tr>
<td></td>
</tr>
</table>

 

框架标签frameset

cols列式    rows行式

<frameset cols='33%,33%,33%'>
<frame src='http://www.baidu.com'>
<frame src='http://www.qq.com'>
<frame src='http://www.sogou.com'>
</frameset>

 

*表单标签<form></form>

属性

action    提交的页面
method    提交的方式(get、post、request)

<form action='get.php' method='get'>
<p>username:<input type='text' name='user' /></p>
<p>password:<input type='password' name='password' /></p>
<input type='submit' value='submit' />
</form>


get.php:
<?php
$uname=$_GET['username'];
$upass=$_GET['password'];
echo "username:".$uname. '<br/>';
echo "password:".$upass;
?>

 

input type=

submit    提交
file    选择文件
reset    重置

文本域

<textarea>
</textarea>

 

posted @ 2020-06-15 00:34  f1veseven  阅读(53)  评论(0编辑  收藏  举报