HTML operation principle: 1. Local operation: open the html file with a browser 2. Remote access operation: local browser accesses remote server (tomcal) It is best not to have Chinese characters in the web page file name, because web page files will be saved on the server in the future. It is recommended to use English to save HTML files. You can use either .htm or .html file suffix. 2. Basic Structure of HTML Document 1. Document skeleton: All web page files usually consist of the following four pairs of tags to form the document skeleton Copy code The code is as follows:<html> <head> <title>Webpage title</title> </head></p> <p><body> This is where you put the content to be displayed on the web page </body> </html> <html>....</html>: marks the beginning and end of a web page. All HTML elements must be placed between these tags. <head>....</head>: identifies the header information of the web page file, such as title, search engine keywords, etc. The content inside is loaded first <title>....</title>: Identifies the title of the web page file <body>....</body>: identifies the main body of the web page file, that is, the visible content of the page 2. Meta tags The meta tag is used to define file information and describe the web page to facilitate search engine search. It should be placed between <head> <head/> Set keywords: (short, for search engines) Describes the version of the web page: Describes what software the web page was created with: Copy code The code is as follows:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"> <html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="Web design, learn web pages" /> <meta name="description" content="How to learn web design, methods of learning web design, HTML Chinese manual" /> <meta name="author" content="123WORDPRESS.COM" /> <meta http-equiv="refresh" content="2;url=http://www.baidu.com" /> <meta name="revised" content="html4.01"> <title>HTML document basic structure_meta tag</title> </head> <body> The meta tag is used to define file information and describe the web page to facilitate search engine search. </body> </html> 3. Head area Copy code The code is as follows:<head> <title>Web page title</title>File title declaration<mate>Some document information, such as the document keywords, description, character set settings, etc. <base> Hyperlink URL base reference point JavaScript and VBScript Programs stylesheet can be used to set the layout declaration <link> can reference external files, such as CSS layout samples </head> 3. Syntax of HTML tags The most basic syntax of HTML is <tag>content</tag>. Tags are usually used in pairs: an opening tag and an ending tag. There is also a single tag without an ending tag, such as <hr/> HTML tag types: single tag and double tagDouble tag: Single marker: Copy code The code is as follows:<!-- With attributes: <tag name attribute="attribute value">...</tag name> For example: <font size="3">.....</font>--> <font size="4" color="#33FF00">2. The physical education teacher said: Anyone who dares to wear a skirt to my class will be punished by standing upside down! </font> </p> <p><!--Without attributes: <tag name>...</tag name> For example: <title>.....</title>--></p> <p><!--With attributes: <tag name attribute="attribute value"> For example: <hr width="200"/> (the default is centered)--> <hr width="200"/></p> <p><!--No attribute: <tag name> Such as: Indicates a line break but not a paragraph break--></p> <p>3. Live in my heart, have you paid the rent? 4. You made me lose face, so I won’t even give you a chance to get back on stage. |
<<: Implementing login page based on layui
>>: Linux operation and maintenance basic process management and environment composition analysis
I recently encountered a problem when doing IM, a...
The ps command in Linux is the abbreviation of Pr...
This method uses the drop-shadow filter in CSS3 t...
This article shares the specific code of JavaScri...
When doing web development, you may encounter the...
For containers, the simplest health check is the ...
Table of contents Preface Mysql case when syntax:...
Because the data binding mechanism of Vue and oth...
introduce RANGE partitioning is based on a given ...
Table of contents Short Introduction 1. Check the...
Table of contents 1. Form events 2. Mouse events ...
The biggest bottleneck of using zabbix is the d...
Preface I had previously enabled Docker's 237...
Table of contents What is a slot Understanding of...
Table of contents 01-Event Bubbling 1.1- Introduc...