HTML is a hypertext markup languageMarkup Language。It includes a series of labels, through which the document format on the network can be unified, and the distributed Internet resources can be connected into a logical whole.HTML text is a descriptive text composed of HTML commands. HTML commands can describe text, graphicsanimation, sounds, tables, links, etc.[1]
HypertextIs a kind ofOrganization InformationBy means ofHyperlinkMethod to connect the text, chart and otherInformation mediaAssociated with.These interrelated information media may be in the same text, or other files, orgeographical positionFiles on a remote computer.This way of organizing information connects information resources distributed in different locations in a random way, providing convenience for people to search and retrieve information.[1]
The full English name of HTML is Hyper Text Markup Language, that isHypertextMarkup Language.HTML is created byWebInventors ofTim Berners-Leewith colleaguesDaniel W.Connolly founded in 1990Markup Language, which is a standard generalized markup languageSGMLApplication of.Hypertext documents written in HTML are called HTML documents, which can be independent of various operating system platforms (such asUNIX,WindowsEtc.).Use HTML to write the information to be expressed asHTML file, via dedicatedbrowserTo identify and "translate" these HTML files into recognizable information, that is, the web pages we see.[2]
HTML has been used aswebOfInformation representationLanguage, HTML files need to be displayed through a web browser.HTML is a language for creating web pages. It displays text, graphics, animations, sounds, tables, links, images and other contents through tag commands.In fact, every HTML document is a static web page file, which contains HTMLCommand code, these instruction codes are notprogramming language, is just a markup structure language for the display position of data in the typesetting web page, easy to learn and understand, very simple.The universal application of HTML is to bring about the technology of hypertext - jump from one topic to another by clicking the mouse, jump from one page to another, and link to files on hosts around the worldHyper Text Transfer ProtocolIt specifies the rules and operations that the browser should follow when running HTML documents.HTTPThe formulation of makes the browser have uniform rules and standards when running hypertext.[2]
web(world wide web, short forwww)OnHypermediaThe document is called a page (foreign language: page).As an organization or individualwebThe page on which the start point is placed is called the home page (foreign language: Home page) or home page. The home page usually includes pointers to other related pages or other nodes(Hyperlink)The so-called hyperlink is a kind ofUniform Resource Locator(Uniform Resource Locator, foreign abbreviation:URL)Pointer, by activating (clicking) itbrowserEasy access to new web pages.This is also one of the most important reasons why HTML is widely used.The organic collection of a series of pages that will logically be regarded as a whole is calledwebsite(Website or Site).Hypertext Markup Language (HTML) is designed for "web page creation and other information that can be seen in web browsers"Markup Language。[3]
The essence of web pages is hypertextMarkup Language, by using otherWeb technology(e.g.:scripting language 、Common gateway interface, components, etc.) can create powerful web pages.Thus, hypertext markup language is the World Wide Web(Web)The foundation of programming, that is, the World Wide Web is based on hypertext.The reason why hypertext markup language is called hypertext markup language is that the text contains so-called "hyperlink" points.[4]
definition
Hypertext Markup Language isStandard Universal Markup LanguageThe next application is also a specification and a standardMarking symbolTo mark parts of the page to display.Web page file itself is atext fileBy adding markers in the text file, you can tell the browser how to display the content (such as how to handle text, how to arrange pictures, and how to display pictures).The browser reads the web page file in order, and then interprets and displays its marked content according to the tag. The tag with writing errors will not point out its errors, and will not stop itsInterpretation and implementationIn the process, the compiler can only analyze the cause and position of the error through the display effect.However, it should be noted that different browsers may have different interpretations of the same marker, which may lead to different display effects.[3]
HTML version
Announce
edit
HTML is used to mark how Web information is presented and other featuresrule of grammar, which was originally created in 1989 byCERNInvented by Tim Berners Lee.HTML is based on the older language SGML definition and simplifies the language elements therein.These elements are used to tell the browser how to display data on the user's screenWeb browserVendor support.[5]
②HTML 2.0: January 1995RFCReleased in 1866, it was declared obsolete after being released in June 2000.[5]
③ HTML 3.2: January 14, 1997, W3C recommended standard.[5]
④ HTML 4.0: December 18, 1997, W3C recommended standard.[5]
⑤HTML 4.01(Minor improvement): December 24, 1999, W3C recommended standard.[5]
⑥HTML 5:HTML5It is recognized as the next generation Web language, greatly improving the Web'sRich media, rich content, rich application and other capabilities, which are said to change eventuallyMobile InternetThe important pusher of.Internet Explorer 8And previous versions are not supported.[6]
HTML plays an important role in the rapid development of the Web.But withnetwork applicationIn depth, especially in the application of e-commerce, HTML is too simple, and its defect is quickly highlighted: HTML is not extensible.HTML not allowedapplication programDevelopers define user-defined tags for specific application environments.HTML can only be used forinformation display 。HTML can set text and picturesDisplay mode, but notsemantic structure, i.e. HTMLDisplay DataIt is based on layout rather than semantics.With the development of network applications, various industries have different needs for information, and these different types of information may not be displayed in the form of web pages.For example, when passingSearch EnginesWhen searching data, displaying data according to semantics rather than layout will have more advantages.
In summary, HTML's shortcomings make itInteractivityPoor, semantic ambiguity, these defects are difficult to meet the requirements of the rapid development of the Internet, so a standard, concise, well structured and highly extensible XML came into being.
characteristic
Announce
edit
The production of hypertext markup language documents is not very complicated, but it is powerful and supports differentdata formatThis is also the World Wide Web(WWW)One of the reasons for its popularity, its main characteristics are as follows:[4]
one
Simplicity: Hypertext Markup LanguageVersion upgradeuseSupersetSo as to be more flexible and convenient.[4]
two
Scalability: The extensive application of hypertext markup language has brought about enhanced functionsidentifier The hypertext markup language takes the form of subclass elements to ensure the system extension.[4]
three
Platform independence: Althoughpersonal computerPopular, but usingMACThere are many other machines in the world, and hypertext markup language can be used on a wide range of platforms, which is another reason why the World Wide Web (WWW) is popular.[4]
four
Universality: In addition, HTML is the universal language of the network, a simple and universal full markup language.It allows web producers to create complex pages that combine text and pictures. These pages can be viewed by any other person on the Internet, no matter what type of computer or browser is used.[4]
Edit Mode
Announce
edit
edit
HTML is actually text, which needs to be interpreted by the browser. Its editors can be divided into the following categories:
Semi WYSIWYG software, such as:FCK-Editer、E-webediterWait onlineWebpageEditor;Particularly recommended:Sublime TextCode editor (developed by Jon Skinner,Sublime Text2. Fees can be charged but the trial period can be unlimited).[7]
three
WYSIWYG software, the most widely usededitor , you can make web pages without any knowledge of HTML, such as:AMAYA(Manufacturer:World Wide Web Consortium);FRONTPAGE(Manufacturer:Microsoft);Dreamweaver(ManufacturerAdobe)。Microsoft Visual Studio(Production company:Microsoft)WYSIWYG software has faster development speed, higher efficiency, and stronger intuitive performance than half WYSIWYG software.To modify anywhere, just refresh and display.The disadvantage is that the generated code structure is complex, which is not conducive to the realization of advanced functions such as multi person collaboration and precise positioning of large websites.[7]
character set
character set
In addition to common ASCII characters and Chinese characters, HTML has manySpecial characters, which together form HTMLcharacter set。There are two situations where special characters need to be used: one is the characters with special meaning in the web page, and the other is the characters not on the keyboard.HTML characters can be represented by some codes, which can be represented in two ways.Namely character code(Named Entity)And numeric codes (numbering entities).The character code starts with the "&" character and ends with the semicolon ";", between which are character names, such as®.Numeric codes also start with "&#" and end with a semicolon ";", with numbers between them, such as®。[8]
data type
Html sample
Hypertext Markup Language defines a variety ofdata typeElement content of, such as script data andstyle sheetAnd many types ofAttribute value, including ID, name, URI, numberLength unit, language, media descriptor, colorCharacter encoding, date and time, etc.All these data types are professional character data.[9]
One web page corresponds to multiple HTML files, and the hypertext markup language file takes. htm or. html (foreign language abbreviation) asExtension(. htm is because of the previousfile systemOnly three digit extensions are supported).You can use anyTXTtypesource fileOftext editorTo generate a hypertext markup language file, just modify the file suffix.Standard hypertext markup language files have a basic overall structure, and tags generally appear in pairs (except for some tags, such as<br/><img/>), that is, the beginning and end of hypertext markup language files and the head and entity of hypertext markup language.Three double markers are used to confirm the overall structure of the page.[10]
Some marks can also appear out of pairs, such as<p>, but generally do not agree to do so.
The tag<html>indicates that the file is described in Hypertext Markup Language, which is the beginning of the file;</html>indicates the end of the file. They are the start and end tags of the hypertext markup language file.[10]
Header content
Flags<html>: indicate that the file is described in hypertext markup language, which is the beginning of the file, while</html>indicates the end of the file. They are the beginning and end marks of the hypertext markup language file.[10]
<head></head>: These two tags represent the beginning and end of the header information respectively.The tag contained in the header is the title, preface, description and other contents of the pagenot regard asContent, but affects the effect of web page display.The most commonly used tags in the header are the title tag and meta tag. The title tag is used to define the title of the page, and its content is displayed in theTitle BlockMedium,Page TitleIt can be used as bookmarks and favorites list by browser.[10]
The following table lists the HTML head elements:
label
describe
<head>
Information that defines the document
<title>
Defines the title of the document
<base>
The default link address of the page link label is defined
<link>
Defines the relationship between a document and external resources
<meta>
Defines metadata in HTML documents
<script>
The script file that defines the client
<style>
A style file that defines an HTML document
Main content
<body></body>;,The actual content displayed in the web page is contained between the two body markers.Body tags are also called entity tags.[10]
Title: There are 6 levels in total, and the definition method is as follows
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><h1>This is the first level title</h1><h2>This is the second level title</h2><h3>This is the third level title</h3><h4>This is the fourth level title</h4><h5>This is a five level title</h5><h6>This is a six level title</h6><p>Define Text</p><p>Random characters<br/>- Line feed</p></body></html>
Relevant requirements
Announce
edit
There are some conventions or default requirements when editing hypertext markup language files and using related tags.[9]
Hypertext Markup Language source program is textfile, its column width can be unlimited, that is, multiple marks can be written as one line, or even the whole file can be written as one line;If written in multiple lines,browserThe carriage return character in the file is generally ignored (except for the mark designation);Spaces in files are usually not displayed according to the effect in the source program.Special symbols (entity symbols) can be used for complete spaces“ (Note that this letter must be lowercase to allow spaces) "expressNon line breaking space;expressfileUse the symbol "/" to separate the path, file name and pathdescribeIt can be enclosed in double quotation marks or without quotation marks.[9]
three
MarkerThe tag element in theAngle bracketEnclosed element with slashexpressThis mark indicates the end;Most markers must be used in pairs to indicate the start and end of the action;Mark elements ignore case, that is, they have the same effect, but complete spaces can use the special symbol "  (note that this letter must be lowercase to allow spaces)";Many markup elements have attribute descriptions, which can be further limited by parametersparameterorattributeThe order of item description is not limited, and it is used betweenSpaceIt can be separated;The content of a markup element can be written in multiple lines.[9]
HTML Comments Start with the "<! --" sign and start with the symbol "-->“end, e.g.<--Comment content -->.Notes can be inserted anywhere in the text.If an exclamation mark is inserted at the front of any mark, it will be identified as a note and will not be displayed.[9]