Home  >  Article  >  Web Front-end  >  What is HTML and how to use it

What is HTML and how to use it

墨辰丷
墨辰丷Original
2018-06-04 15:17:483433browse

HTML is Hypertext Markup Language, a simple markup language used to create hypertext documents. This article introduces the development and basic concepts of html in detail. Those who are interested can learn more

The development history of HTML:

HTML in English means Hypertext Marked Language, which is a simple markup language used to create hypertext documents. HTML is a markup language created in 1990 by WEB inventor Tim Berners-Lee and colleague Daniel W. Connolly. It is an application of the standard generalized markup language SGML.

Hypertext documents written in HTML are called HTML documents, which are independent of various operating system platforms (such as UNIX, WINDOWS, etc.). Through HTML, the information that needs to be expressed is written into HTML files according to certain rules, recognized by a dedicated browser, and these HTML are "translated" into identifiable information in a language that can be widely understood, that is, all A "native language" for publishing that computers can understand. This is the web page we see now. Since 1990, HTML has been used as the information representation language of WWW (abbreviation of World Wide Web, also abbreviated as WEB, called World Wide Web in Chinese), used to describe the format design of Homepage and its link information with other Homepages on WWW. . Files described in HTML language need to be displayed through a WWW browser.

HTML (Hyperdocument Markup Language) is a language for creating web page documents. It displays images, sounds, pictures, text, animations, videos and other content through markup instructions (Tag). Because it can jump from one file to another, connecting files with hosts around the world. The Hypertext Transfer Protocol stipulates the rules and operations that browsers follow when running HTML documents. The formulation of the HTTP protocol enables browsers to have unified rules and standards when running hypertext.

The so-called hypertext Text, because it can add pictures, sounds, animations, movies and other content. In fact, every HTML document is a static web page file. This file contains HTML instruction codes. These instruction codes are not a programming language. , it is just a markup structure language for typing the display position of data in web pages. It is easy to learn and understand, and is very simple. The universal application of HTML brought about the technology of hypertext - jumping from one topic to another with a click of the mouse, jumping from one page to another and linking to files on hosts around the world. Get direct access to relevant topics. As shown below:

Colorful design styles can be displayed through html:

Image call:
Text format: Text

Jumping between pages can be achieved through HTML:

Page jump: 〈A HREF="File path/file name">

Multimedia effects can be displayed through HTML:

Audio:
Video:

From above we can see HTML hypertext Some tags that need to be used when creating files. Each symbol used as a tag in HTML is a command that tells the browser how to display text. These tags are composed of "<" and ">" symbols and a string. The function of the browser is to interpret these tags, display text, images, animations, and play sounds. These tag symbols are represented by "".

HTML is just a plain text file. To create an HTML document, you only need two tools, an HTML editor and a WEB browser. HTML Editor is an application used to generate and save THML documents. A WEB browser is a client program used to open WEB web page files and provide us with the ability to view WEB resources.

HTML documents are plain text files (it can be written with any text writer). For example, HTML language can be edited directly using an ordinary text editor.

The powerful functions of HTML:

  1. Publish online documents, which include titles, text, tables, and lists and photos and other content.

  2. Retrieve online information through hyperlinks.

  3. Forms are designed to obtain remote services and can be used to retrieve information, order products, etc.

  4. Include spreadsheets, video clips, sound clips, and other applications directly in the document.

HTML Wide application:

All World Wide Web documents are created by Hypertext Markup Language HTML. In this language, files can be processed using various tags. These tags determine the appearance, structure, and interactivity of the file content. What they have in common is the use of "<>", such as paragraph tags

, image tags , etc.

In the browser, you cannot see any HTML tags, but the web page effects you see in the browser are all generated by these tags. In most cases, you don't need to master HTML markup when creating a site, because in software like FrontPage, the processing of HTML happens behind the scenes, thus masking the complexity of the language. If you need to view the HTML markup of a web page, you can select HTML mode.

Most of today’s web page production uses some specialized web page production tools, such as Dreamweaver, webstorm, etc. These tools are WYSIWYG and are very convenient. But don’t think that just knowing these tools is enough. Many times, we need to manually adjust the HTML code to achieve better and more professional results.

After understanding the definition of HTML, let’s learn this language.​

1. Why should we learn HTML?

In the past two years, many companies have developed graphical HTML development tools, making the production of web pages very simple. Editing tools such as webstorm, Adobe Pagemill launched by Adobe, and Dreamweaver launched by Micromedia are all known as "What You See Is What You Get" web page production tools. These graphical development tools can directly process web pages without writing laborious markup. This allows users to write web pages without any basic knowledge of HTML language. At this time, the task of writing HTML documents is completed for you by the development tools. This is the greatest success of web graphics editing tools, but it is also their greatest weakness. Constrained by the graphics editing tool itself, a large amount of junk code will be generated. The reason is very simple. For example: when designing a table on a web page, if the width and height of each cell are automatically determined based on the content, HTML only needs to tell it the order in which the table and cells are arranged (that is, the number of rows and columns). , but because the graphical development tool cannot know your special requirements, it can only take the general requirements and define the width and height of each cell, thus adding a lot of code. Therefore, a wise web page writer should further learn the HTML language on the basis of mastering graphical editing tools, so as to know what is junk code. In this way, we can use graphical HTML development tools to quickly create web pages and eliminate useless code. code to achieve the purpose of quickly producing high-quality web pages.

Therefore, HTML language is the basis for web page production and is a must-learn for beginners. Although there are many WYSIWYG web page creation tools, in the final analysis, it is still necessary to understand some HTML syntax. In this way, you can control the layout of the page more accurately and realize more functions.

2. How to use HTML?

HTML language, also known as Hyper Text Markup Language, is the abbreviation of English Hyper Text Markup Language. As a markup language, HTML language is composed of some specific symbols and syntax, so it is very easy to understand and master. It can be said that the HTML language is the easiest to learn among all computer programming languages. The documents that make up HTML are all ASCII files, so creating HTML files is very simple and only requires an ordinary character editor. For example, Notepad and WordPad in Windows can be used. You can also use dedicated HTML editing tools: tools such as CoffeeHTML, Homesite, HTMLedit Pro, etc. Their feature is that they can automatically check grammatical errors in HTML documents and assist in corrections. Thanks to the graphical HTML development tool, it is easier for us to learn HTML. We can use it to create a web page first, and then delete the useless code in the HTML code editor that comes with it, and use its WYSIWYG Features, so that we can quickly master HTML. In particular, Dreamweaver 4, recently released by Micromedia, can put the source code editor and the web page editor in the same window, which is really convenient.

3. Basic concepts of HTML

1. Definition:

HTML language is a To put it simply, the markup language of hypertext is to construct a set of markup symbols and grammatical rules to arrange the text, images, sounds and other elements to be displayed according to certain standard requirements to form certain units such as titles, paragraphs, lists, etc.

2. Hypertext tags

1) Hypertext tags are represented by angle brackets “<” and “>”.

2) Hypertext tags generally appear in pairs, with an element with a slash indicating the end. Such as: and . However, some tags only have a start tag but no end tag, such as:
, which indicates the introduction of a line break in the web page. Some tags can be omitted, such as: the end tag of a paragraph,

, can be omitted.

3) Hypertext tags ignore case, such as: and are equivalent, but the names of entity content are case-sensitive, such as "&NAME" and "&name" are Represents different entities.

4) A mark element can be written on multiple lines, and the parameter position is not restricted.

3. Units (elements) of HTML language      

The content of the entire web page is composed of many units formed by specific content, and each unit is composed of three parts-- --Start tag, unit content, end tag.

Start tag: The start tag is defined by "<" and ">", and the unit name and attributes are given by the start tag;

Unit content: The middle part is for the unit Content part;

End tag: The end tag is delimited by "" and ">", one more slash than the start tag;

For example: the tag form of the title bar unit

<TITLE>Interview with the Top Scorer in the College Entrance Examination--Recording the Growth Experience of a Farmer's Child</TITLE>

Among them,<TITLE>and</TITLE>are the start and end marks, "College Entrance Examination" "Interview with the Number One Scholar - Recording the Growth Experience of a Farmer's Child" is the basic content of the unit.

In short, the entire HTML document is composed of tags. The tags of the HTML document establish a fixed framework for writing the document. We only need to fill in the content in this framework.

The key to learning how to use HTML language well is to flexibly apply markup parameters. Especially the application of default values

Summary:The above is the entire content of this article, I hope it will be helpful to everyone's learning.

Related recommendations:

What is HTML? A detailed introduction to html

#What is an html file? How to open an html file

What is HTML related introduction_Basic tutorial

The above is the detailed content of What is HTML and how to use it. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn