The connection and difference between HTML, CSS, JavaScript, and PHP

HTML, CSS, JavaScript, and PHP are all web development languages. HTML, CSS, and JavaScript are front-end languages, and PHP is a back-end language. Let's first study the concepts of various languages:

HTML (Hyper Text Markup Language)
is not a programming language, but a markup language that uses markup tags to describe web pages. Then the browser reads the HTML document, uses tags to interpret the content of the page, and displays it in the form of a web page.

CSS (Cascading Style Sheet)
cascading style sheet is a style sheet language used to render HTML web pages. It can change the color, font, position and other attributes. It can not only modify the web page statically, but also dynamically adjust it with various scripting languages. Format the elements of the web page.

JavaScript (JS)
is a literal scripting language that runs on the browser. Usually, JavaScript scripts realize their functions by embedding them in HTML. The syntax is similar to Java, and some names and naming conventions are also borrowed from Java.

PHP (Hypertext Preprocessor)
is a scripting language executed on the server side, which is especially suitable for web development and can be embedded in HTML. Server-side scripting is the most traditional and main target area of ​​PHP. PHP is dubbed "the best language in the world".

Next, let's study the characteristics and connections of these languages:

In Web development, part of the code runs on the client side, and some runs on the server side. The part that runs on the client side (usually a browser) is called the front end, and HTML+CSS+JS is the most common front-end language combination. PHP runs on the server, and you can use PHP to build an interactive Web with simple learning.

HTML creates a web page and then uses CSS to beautify it. JS makes the web page interactive and makes it move.
PHP processes data and manipulates data on its backend, adding, deleting, modifying and checking.
To put it simply: HTML, CSS, and JS are visible to the naked eye, and PHP is invisible.

If you think of the Web as a person, then HTML is the human body, CSS is the human appearance, JS is the human action, then PHP is the human brain. Appearance, movement, and brain can't move away from the human body. The body without appearance, movement, and brain is an ugly empty shell. The relationship between JS and PHP is even more intriguing: if you only act without thinking, it is a walking dead, which has no meaning; if you only think without action, it is a vegetable. This shows that JS and PHP are complementary.

Guess you like

Origin blog.csdn.net/weixin_46941346/article/details/113265303