This article will mainly explain html
Some basic grammar and usage of , Understanding the corresponding basic syntax will be helpful for subsequent automated testing , In addition, there is a portal for a series of articles below , It's still being updated , Interested partners can also go to check , Don't talk much , Let's have a look ~
Series articles :
Series articles 1:【Python automated testing 1】 meet Python The beauty of the
Series articles 2:【Python automated testing 2】Python Installation configuration and PyCharm Basic use
Series articles 3:【Python automated testing 3】 First knowledge of data types and basic syntax
Series articles 4:【Python automated testing 4】 Summary of string knowledge
Series articles 5:【Python automated testing 5】 List and tuple knowledge summary
Series articles 6:【Python automated testing 6】 Dictionary and collective knowledge summary
Series articles 7:【Python automated testing 7】 Data operator knowledge collection
Series articles 8:【Python automated testing 8】 Explanation of process control statement
Series articles 9:【Python automated testing 9】 Function knowledge collection
Series articles 10:【Python automated testing 10】 File basic operation
Series articles 11:【Python automated testing 11】 modular 、 Package and path knowledge collection
Series articles 12:【Python automated testing 12】 Knowledge collection of exception handling mechanism
Series articles 13:【Python automated testing 13】 class 、 object 、 Collection of attribute and method knowledge
Series articles 14:【Python automated testing 14】Python Basic and advanced exercises of automatic test
Series articles 15:【Python automated testing 15】unittest The core concept and function of test framework
Series articles 16:【Python automated testing 16】 Test case data separation
Series articles 17:【Python automated testing 17】openpyxl Secondary packaging and data driven
Series articles 18:【Python automated testing 18】 Configuration file analysis and practical application
Series articles 19:【Python automated testing 19】 Log system logging Explain
Series articles 20:【Python automated testing 20】 Construction of interface automation test framework model
Series articles 21:【Python automated testing 21】 Interface automation test practice 1 _ Interface concept 、 Project introduction and test process Q & A
Series articles 22:【Python automated testing 22】 Interface automation test practice II _ Interface framework modification and use case optimization
Series articles 23:【Python automated testing 23】 Interface automation test practice III _ Dynamic parameterization and data forgery
Series articles 24:【Python automated testing 24】 Interface automation test practice IV _Python Operating the database
Series articles 25:【Python automated testing 25】 Interface automation test practice 5 _ Database assertion 、 Interface Association and related management optimization
Series articles 26:【Python automated testing 26】 Interface automation test practice 6 _pytest frame +allure Explain
Series articles 27:【Python automated testing 27】Web Automated testing theory 、 Environment construction and common operations
HTML The full name of is hypertext markup language , It's a markup language . It includes a series of labels , Through these tags, the document format on the network can be unified , To disperse Internet Resources are connected as a logical whole .HTML Text is created by HTML Descriptive text composed of commands ,HTML Command descriptive text , graphics 、 Animation 、 voice 、 form 、 Links, etc. .
Hypertext is a way to organize information , It links the text in the text through the hyperlink method 、 Charts are associated with other information media . These interrelated information media may be in the same text , It could be other documents , Or a file on a computer that's geographically distant . This way of organizing information connects information resources distributed in different locations in a random way , Find for people , Information retrieval provides convenience . – Baidu Encyclopedia
""" HTML The basic structure : 1、 Tag name <input> 2、 attribute <input id="kw"> 3、text tieba <a href="http://tieba.baidu.com/" target="_blank" class="mnav c-font-normal c-color-t"> tieba </a> 4、 Embedded tags span Embedded label <a>text <span><span> </a> """
The composition of the whole web page , It's a label , The label is <html> </html>
, There are a lot of labels , The following only lists 11 A common label , At the same time, we are also giving an example , Can be more clear 、 Visually see how to use :
""" Common labels : 1、p 2、h1-h6 3、div 4、span 5、a 6、img 7、iframe 8、input、text、password、checkbox、radio、file 9、select 10、form 11、html """
Create a new one html The default code snippet after the file is as follows :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="http://httpbin.org/post" method="post">
<h1> title 1</h1>
<h2> title 2</h2>
<h3> title 3</h3>
<h4> title 4</h4>
<h5> title 5</h5>
<h6> title 6</h6>
<p> The paragraph 1</p>
<p> The paragraph 2</p>
<div> Blank block , I will change my line </div>
<span> Blank block , I won't change my career </span>
<!-- img You can put local pictures or network pictures , You can also do the following , Match the picture with the website , Click to jump to Baidu interface -->
<div>
<a href="https://www.baidu.com">
<img src="123.png"></a>
</div>
<iframe src="http://localhost:63342/CSDN_Python_Demo/123.html?_ijt=p8ashg72nflt31e5omkn101umc" width="300" height="300"></iframe>
<div>
user name :<input name="username" placeholder=" Please enter a user name " >
password :<input name="password" type="password" placeholder=" Please input a password " >
<!-- readonly Can't type ,disabled Completely locked -->
user name :<input name="username" placeholder=" Please enter a user name " readonly>
password :<input name="password" type="password" placeholder=" Please input a password " disabled>
</div>
<!-- Radio buttons -->
<div>
What is your favorite blogger ?
<input type="radio" name="fav" value="A: Meng Xiaotian ">A: Meng Xiaotian
<input type="radio" name="fav" value="B:A">B:A
<input type="radio" name="fav" value="C:B">C:B
</div>
<!-- Checkbox -->
<div>
Which of the following foods do you like to eat ?
<input type="checkbox" name="food" value=" sirloin "> sirloin
<input type="checkbox" name="food" value=" Hot pot "> Hot pot
<input type="checkbox" name="food" value=" Sushi "> Sushi
<input type="checkbox" name="food" value=" Crayfish "> Crayfish
</div>
<!-- Upload files -->
<div>
<input name="my_file" type="file">
</div>
<div>
<input name="my_date" type="date">
</div>
<div>
<input name="my_color" type="color">
</div>
<div>
<input name="my_range" type="range">
</div>
<div>
<input name="my_submit" type="submit">
</div>
<select name="sl">
<option> Love </option>
<option> The old </option>
<option> The tiger </option>
<option> oil </option>
</select>
</form>
</body>
</html>
Running results :
First , Regular replacement of
Hello everyone , I am a Python