Home>Article>Backend Development> What are the similarities and differences between php and html?

What are the similarities and differences between php and html?

angryTom
angryTom Original
2019-08-23 11:24:00 3954browse

What are the similarities and differences between php and html?

HTML is a hypertext markup language; PHP's unique syntax mixes C, Java, Perl and PHP's innovative syntax.

HTML is mainly used for client display. For example, the web pages we browse, especially static web pages, are all written in HTML language. Right-click on the web page and view the source file to see the HTML code. .

PHP is the language of the server. It is mainly used to process information submitted by customers through web pages. It runs on the server side and is used to respond to customer requests. It can execute dynamic web pages faster than CGI or Perl. Compared with other programming languages, dynamic pages made with PHP;

PHP embeds programs into HTML documents for execution, and the execution efficiency is much higher than CGI that completely generates HTML tags; PHP can also execute After compiling the code, compilation can achieve encryption and optimize code running, making the code run faster. PHP has very powerful functions. PHP can realize all CGI functions and supports almost all popular databases and operating systems.

Recommended tutorial:PHP video tutorial

##PHP

PHP stands for "Hypertext Preprocessor" and is a general open source scripting language.

PHP is a scripting language executed on the server side. It is similar to C language and is a commonly used website programming language.PHP's unique syntax mixes C, Java, Perl and PHP's own syntax. It is conducive to learning and widely used. It is mainly suitable for the field of web development.

PHP was originally the abbreviation of Personal Home Page and has been officially renamed "PHP: Hypertext Preprocessor". Since the domestic Internet began to develop in the 1990s, Internet information has covered almost all areas of knowledge in our daily activities, and has gradually become an indispensable part of our lives, studies, and work. According to statistics, since 2003, the size of my country's web pages has basically maintained a doubling growth rate, and is showing an upward trend. As the most popular website program development language today, PHP language has the advantages of low cost, fast speed, good portability, and rich built-in function libraries. Therefore, it is used by more and more companies in website development. However, with the continuous upgrading of the Internet, many problems have arisen in the PHP language.

According to the requirements of dynamic websites, PHP language, as a language program, its specificity gradually appears in the application process, and its technical level will directly affect the operating efficiency of the website. Its characteristics are that it has an open source code and has a high similarity in programming with general-purpose languages such as C language. Therefore, it is easy to understand and has strong operability during operation. At the same time, the PHP language has a high level of data transmission, processing and output, and can be widely used in Windows systems and various types of Web servers. If the amount of data is large, the PHP language can also broaden the link surface and connect to various databases to alleviate the pressure of data storage, retrieval and maintenance. With the development of technology, PHP language search engines can also be tailored to provide personalized services, such as classifying, collecting and storing data according to customer preferences, which greatly improves data operation efficiency.

HTML## Hyper Text Markup Language (Hyper Text Markup Language), an application under the Standard Universal Markup Language.

HTML is not a programming language, but a markup language, which is necessary for web page production

. "Hypertext" means that the page can contain pictures, links, and even non-text elements such as music and programs. The structure of Hypertext Markup Language (or Hypertext Tag Language) includes a "head" part and a "body" part, where the "head" part provides information about the web page and the "body" part provides the specific content of the web page.

Origin

A hypermedia document on the World Wide Web is called a page (foreign language: page). The page that is the starting point for an organization or individual on the World Wide Web is called the homepage (foreign language: Homepage) or homepage. The homepage usually includes pointers (hyperlinks) to other related pages or other nodes. The so-called hyperlink is a Uniform Resource Locator (Uniform Resource Locator, foreign language abbreviation: URL) pointer, by activating (clicking) it, the browser can easily obtain new web pages. This is also one of the most important reasons why HTML is widely used. An organic collection of pages that is logically viewed as a whole is called a website (Website or Site). Hypertext Markup Language (English abbreviation: HTML) is a markup language designed for "web page creation and other information that can be seen in a web browser".

The essence of a web page is Hypertext Markup Language. By combining it with other Web technologies (such as scripting languages, public gateway interfaces, components, etc.), powerful web pages can be created. Therefore, Hypertext Markup Language is the basis of World Wide Web (Web) programming, which means that the World Wide Web is built on hypertext. Hypertext Markup Language is called Hypertext Markup Language because the text contains so-called "hyperlink" points.

Definition

Hypertext markup language is an application under the standard universal markup language. It is also a specification and a standard. It uses markup symbols to mark what is to be displayed. various parts of the web page. The web page file itself is a text file. By adding tags to the text file, you can tell the browser how to display the content (such as how to process text, how to arrange pictures, how to display pictures, etc.). The browser reads the web page files in order, and then interprets and displays the marked content according to the tags. The error will not be pointed out for wrongly written tags, and the interpretation and execution process will not be stopped. The compiler can only analyze the cause of the error through the display effect. and error location. However, it should be noted that different browsers may have different interpretations of the same tag, and thus may have different display effects.

The above is the detailed content of What are the similarities and differences between php and html?. 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