Web front-end study notes one

What is HTML?

  • HTML refers to Hypertext Markup Language ( H yper  T ext  M arkup  L anguage)
  • HTML is not a programming language, but a markup language  (markup language)
  • Markup Language is a set of markup tags  (markup tag)
  • HTML uses markup tags to describe web pages

main effect:

  • Do data presentation

HTML tags:

  • HTML tags usually appear in pairs , such as <body> and </body>
  • A single tag is a single occurrence such as: line break<br/>, <meta/>
  • The first label in the double label pair is the start label , and the second label is the end label

HTML document = web page

  • HTML document describing web page
  • HTML documents contain HTML tags and plain text
  • HTML documents are also called web pages
  •  

Use sublime_text software to write html

  1. Choose file save path
  2. Open the software --> File --> New file 、
  3. Save and command: Naming format:  file name.html
  4. Write code -> Shortcut: ! +Tab (This shortcut can quickly generate some commonly used codes and reduce the workload)

1.html source code

<!DOCTYPE html>   
<html lang="en">      
<head>
	<meta charset="UTF-8">
	<title>我的第一个Html 标题</title>
</head>

<body>
	<div Align="center">
	<H1>登录</H1>
		<form ction = "2.html">
			<p>用户名:<input type = "text"/><br/></p>
			<p>密码:<input Password = "text"/><br/></p>
            <p><input type="submit" value="提交"><br/></p>
		</form>
	</div>

    <div Align="center">
	<H4>性别</H4>
		<form ction = "2.html">
			<p><input type="radio"  value="1">男<br/></p>
			<p><input type="radio"  value="2">女<br/></p>
			<p><input type="submit" value="提交"><br/></p>
		</form>
	</div>

</body>
</html>

2.html

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<H1>跳转成功</H1>
	<a href="http://www.Baidu.com.cn/" target="_blank">Visit Baidu!</a>
</body>
</html>

Source code detailed introduction

<!DOCTYPE html>           /*DOCTYPE :  Document 与 Type 的简写 ,表示文件头: 页面的响应数据类型*/
<html lang="en">          /*lang : Language 语言的意思 ;   en表示英文;   zh-cn 或者 cn 表示中文*/
<head>                         /*Head 表示html的头的部分*/
    <meta charset="UTF-8">      /*Meta ---metadata  : 源数据     UTF-8 ----Unicode码 全世界的通用码*/
    <title>我的第一个Html 标题</title>    /*Title :表示文档的标题*/
</head>

<body>                           /*Body 表示html的正文的部分*/

<div Align="center">       /*div :分区标签   Align="center" :居中*/
    <H1>正文标题</H1>        /*HTML 正文标题(Heading)是通过 <h1> - <h6> 等标签进行定义的。<h1> 定义最大的标题。<h6> 定义最小的标题。*/

    <form ction = "2.html">                      /* Form---表单     该标签一般不会单独使用 会和input标签联合使用/

            <p>用户名:<input type = "text"/><br/></p>     /*Text ----文本框 */
            <p>密码:<input Password = "text"/><br/></p>    /*Password ----密码框*/
            <p><input type="submit" value="提交"><br/></p>   /*Submit ----提交按钮*/
    </form>

</div>

</body>
</html>

 

Guess you like

Origin blog.csdn.net/weixin_49472648/article/details/110244353