First, the HTML
HTML is an abbreviation for the English Hyper Text mark-up Language (Hypertext Markup Language), which is a standard language (tag) for making Web pages. The equivalent of a uniform set of rules, everyone to abide by him, so that you can let the browser according to the rules of the markup language to explain it. The browser is responsible for translating the label into a user "readable" format, presented to the user!
First look at the label you gave when you created an HTML file by default in Pycharm:
1 <! DOCTYPE html>
2 3
4 <meta charset= "UTF-8"/>
5 <title>Title</title>
6
7 <body>
8
9 </body>
Ten
DOCTYPE tells the browser what HTML or XHTML specifications are used to parse the HTML document, each with a start and end flag, such as:
1. Page encoding (tell the browser what the code is)
< meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >
<meta charset= "UTF-8" >
2. Refresh and jump (the first is to achieve 3 seconds to refresh once, the second is 5 seconds to jump to Baidu)
< meta http-equiv= "Refresh" content= "3″>
< meta http-equiv= "Refresh" content= "5; Url=http://www.baidu.com "/>
3. Key words
< meta name= "keywords" content= "StarCraft 2, star old boy, interview, F91, small color, JOY" >
<title></title>; is the information on the head of the webpage; there's nothing special about that. Below we mainly look at the tags commonly used in <body></body>:
1, the label is generally divided into two kinds: block-level labels and in-line labels
A, span, select, etc., belong to the inline label
Div, H1, p, etc., belong to block level label
Label:
<a href= "http://www.baidu.com" > Baidu </a>; so click on the "Baidu" when the original page opens Baidu page, add a target= ' _black ' inside, will open Baidu page with a new interface;
<select><option></option></select>; Select the label,<option> to put all the selections.
The <input type= "Text/password/radio/checkbox/file/button/textarea"/>;type types represent input text, passwords, radio boxes, check boxes, upload files, buttons, and multiline text, respectively.
<label for= "Male" > User name:</label>
<input type= "text" id= "male"/>
<br/>
User name: <input type= "text"/> ; This four line is a label label, it does not directly render to the user any effect, but to do the input label, in this example, the label tag, click on the user name will also enter the text box, There is no label label that will have this effect
Note: If you want to submit the above tags to the background, then you need to put these tags in the <form action= "URL address" ></form> tag.
1 <table border= " 1 >2 <tr><td> Title one </td><td> title two </td></tr>3 <tr><td rowspan = " " >1</td><td>2</td></tr>4 <tr><td>4 </td></tr>5 <tr><td colspan=" 2 " >3</td></tr >6 </table>
<table> is the table label,<tr> represents a row, how many <td> indicates how many columns in the,<td> two parameters rowspan represents a row merge, colspan represents a column merge, the result is this:
2. CSS style:
CSS is an abbreviation for the English cascading style sheets, called Cascading style sheets, to beautify the page.
There are three ways to exist: element inline, page embedding, and external introduction, comparing the pros and cons of three different ways.
Syntax: style = ' key1:value1;key2:value2; '
- Use style= ' xx:xxx in the label; '
- Embed < style type= "Text/css" > </style > blocks in the page
- Introducing an external CSS file
12<meta charset="UTF-8"/>3<!--<meta http-equiv="Refresh"Content="5; Url= ' http://www.baidu.com '"/>-->4<title>Title</title>5<style>6/* Tag Selector */7 div{8font-size:100px;9 }Ten/*class Selector */ One . c2{ A color:red; - } -/* Level selector */ the . c3 Div a{ -background-Color:aqua; - Color:blue; - } +/* Combo Selector */ - . c5,.c6{ + height:150px; Abackground-Color:aquamarine; at } -</style> - -<body> -<div> Tag Selector </div> -<aclass="C2">class selector </a> in<divclass="C3"> -<div> to<aclass="C4"> + Hierarchy Selector -</a> the</div> *</div> $<aclass="c5"> Combo Selector 1</a>Panax Notoginseng<aclass="c6"> Combo Selector 2</a>
This code refers to the use of selectors and decorations, but also corresponds to the second way mentioned in the page embedding < style type= "Text/css" > </style > Block to achieve, the first is particularly simple, is to decorate with a style directly in a div or a tag, and the third one will be reflected in a later blog post.
Html+css+js