温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

常用html元素结构是什么

发布时间:2021-06-18 10:12:44 来源:亿速云 阅读:119 作者:小新 栏目:web开发

这篇文章主要介绍常用html元素结构是什么,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

这次给大家带来常用html元素结构有哪些,使用常用html元素结构的注意事项有哪些,下面就是实战案例,一起来看一下。

  1. 基本结构:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title></title> 
</head> 
<body> 
</body> 
</html>

2.文档类型:

(1)HTML 4.01

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

(2)HTML5

<!DOCTYPE html>

(3)XHTML 1.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

3.头部:
(1)字符集

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

(2)引入JS

<script language="javascript"></script> 
<script language="javascript" src=""></script> 
<script language="javascript">var u="__URL__";var a="__APP__";</script> 
<script language="javascript" src="__PUBLIC__/js/jquery-1.8.1.min.js"></script>

(3)引入CSS

复制代码

代码如下:

<style type="text/css"></style> 
<link rel="stylesheet" href="" type="text/css">

(4)设置默认跳转

<base href="" /> 
<base target="_blank" />

(5)设置搜索引擎相关信息

<meta name="description" content=",," />
<meta name="keywords" content=",," />

4.主体:

(1)基本内容

<body onload=""> 
<div id="" class="">
</div> <div style="clear:both;">

(2)表单
GET方式提交:

<form id="" action="" method="post"></form>

POST方式提交:

<form id="" action="" method="get"></form>


携带文件提交:

<form id="" action="" method="post" enctype="multipart/form-data"></form>


首页常用:

文本域:<input id="" name="" class="" type="text"></input>
密码域:<input id="" name="" class="" type="password"></input> 
普通按钮:<input id="" name="" class="" type="button"></input> 
单选按钮:<input id="" name="" class="" type="radio"></input> 
多选按钮:<input id="" name="" class="" type="checkbox"></input>

以上是“常用html元素结构是什么”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI