1.What is HTML?

When you write a normal document using a word processor like Microsoft Word/Office, your text is saved in a file with a special format. It is not simply saved as the string of words you typed since the document needs to preserve things like the font you chose, the size of the text, which words are in bold, which italics, and so on. The special format includes not only your words, but all these extra information so that the next time Word opens your document, it can display the document with the exact appearance you created earlier.

你浏览的网页是一个有着某种特定格式的页面,而记录这个页面如何显示就是HTML。

In the same way, web pages are simply strings of words put in a special format that web browsers are able to display. While the format of Word documents is simply called "Word format" (or "doc format"), loosely speaking, one might say that web pages are formatted using "HTML". Take the paragraph of text in the box below for example:

This is an example paragraph to illustrate what HTML is, for the purpose of explaining common terms like HTML, JavaScript and PHP.

If you were to peek into the raw code for the above words, you will see the following:

This is an example paragraph to illustrate what HTML is, for the purpose of <a href="http://www.thesitewizard.com/html-tutorial/what-is-html.shtml">explaining common terms like HTML, JavaScript and PHP</a>.

Notice that it is more or less like the text given earlier, except that there is additional information embedded. For example, the portion that says <a href="http://www.thesitewizard.com/html-tutorial/what-is-html.shtml"> (which I placed in a different font above to make it easier to spot) tells the web browser that what follows, until </a> is reached, is to be regarded as a link pointing at the web address http://www.thesitewizard.com/html-tutorial/what-is-html.shtml

When the web browser sees this information, it makes the words "explaining common terms like... [etc]" appear as the blue underlined text that represents a clickable link. The rest of the text is just displayed as-is.

2. What are JavaScript and PHP

Since the HTML/CSS combination is analogous to the data found in a Word document, it is good only for displaying information.

If you want your web pages to do different things depending on the situation, you will need a programming language. For example, some websites want to provide a membership facility where people can log into the site, and access certain information. Other sites provide a feedback form so that visitors can contact them. All these things require facilities that a simple document format cannot do.

Programs written in JavaScript run in the web browser itself, so if your website has a JavaScript program, the program will be automatically fetched by your visitor's browser and executed on his/her computer.

JS是一种语言,运行在客户端(浏览器就是客户端),可以用来显示网页中的某些功能。浏览器根据用户的请求去服务端,如果服务端有一个js
的程序, 这段程序就会被返回给用户。然后你的浏览器把这段程序表示出来。
PHP and Perl programs, on the other hand, run
on the computer where your website is located, that is, on
your web host's
computer. After the PHP or Perl program does what it needs to do,
it sends the result to the visitor's web browser, which merely
displays the results.
 
PHP是在服务器上运动的程序语言,用户发来请求,服务器通过PHP程序处理,然后把结果返回给客户端,然后客户端显示出来给用户看。

JavaScriptPHP and Perl are three of the most
commonly-used programming languages on the Internet. They are used
by websites to carry out more complicated operations.

总结一下,PHP是服务端语言,JS是客户端语言。HTML是一种格式。服务端语言主要是用来生成html+javascript这样的客户端页面的,它们不会被实际发送到客户端,而是先在服务器端的计算机上执行,然后生成客户端代码,再将这些代码发送给浏览网页的客户端。
浏览器完全不懂服务器端的语言。

http://www.thesitewizard.com/html-tutorial/what-is-html.shtml

[转] 学习HTML/JavaScript/PHP 三者的关系以及各自的作用的更多相关文章

  1. HTML、 CSS、 JavaScript三者的关系 1

    HTML. CSS. JavaScript三者的关系 网页主要由三部分组成: 结构( Structure) . 表现( Presentation) 和行为( Behavior)    HTML —— ...

  2. Javascript Prototype __proto__ constructor 三者的关系

    JavaScript三大毒瘤 --- this,原型链,作用域 在我等菜鸟一步一步升级中的过程中,这三个概念总是困扰这我们(可能只有我吧,我比较蠢).这三个东西往往都很绕,今天我就来分享一下我对原型. ...

  3. HTML、 CSS、 JavaScript三者的关系

    HTML. CSS. JavaScript三者的关系    网页主要由三部分组成: 结构( Structure) . 表现( Presentation) 和行为( Behavior)    HTML ...

  4. JavaScript学习笔记(2)——JavaScript和DOM的关系

    文档对象模型(Document Object Model,简称DOM),是W3C组织推荐的处理可扩展标志语言的标准编程接口.DOM实际上是以面向对象方式描述的文档模型.DOM定义了表示和修改文档所需的 ...

  5. HTML 学习笔记 JavaScript(面向对象)

    现在让我们继续跟着大神的脚步前进 学习一下JavaScript中的面向对象的思想,其实作为一个iOS开发者,对面向对象还是比较熟悉的,但是昨晚看了一下Js中的面向对象,妈蛋 一脸萌比啊.还好有大神.让 ...

  6. 5月31日 python学习总结 JavaScript概述

    JavaScript概述 ECMAScript和JavaScript的关系 1996年11月,JavaScript的创造者--Netscape公司,决定将JavaScript提交给国际标准化组织ECM ...

  7. JavaScript学习13 JavaScript中的继承

    JavaScript学习13 JavaScript中的继承 继承第一种方式:对象冒充 <script type="text/javascript"> //继承第一种方式 ...

  8. 前端之JavaScript第一天学习(1)-JavaScript 简介

    javaScript 是世界上最流行的编程语言. 这门语言可用于 HTML 和 web,更可广泛用于服务器.PC.笔记本电脑.平板电脑和智能手机等设备. JavaScript 是脚本语言 JavaSc ...

  9. 简述configure、pkg-config、pkg_config_path三者的关系

    简述configure.pkg-config.pkg_config_path三者的关系 一.什么是configure 源码安装过程中大多会用到configure这个程序,一般的configure都是一 ...

随机推荐

  1. C#DateTimePicker设置自定义格式

    摘自Microsoft TechNet DateTimePicker.CustomFormat 属性 包含日期和时间分隔符的显示字符串文字或格式字符串,必须在子字符串中使用转义符. 例如,若要显示将日 ...

  2. Linux 使用yum install安装mysql登陆不上解决办法

    CentOS yum安装mysql后 Can’t connect to local MySQL server through socket ‘/var/lib/ CentOS Can’t connec ...

  3. Python Tutorial 学习(十)-- Brief Tour of the Standard Library

    10.1. Operating System Interface os库 import os os.getcwd() # Return the current working directory 'C ...

  4. Caesar

    要求实现用户输入一个数改变26个字母的排列顺序 例如输入3: DEFGHIJKLMNOPQRSTUVWXYZABC 输入-3: XYZABCDEFGHIJKLMNOPQRSTUVW 使用循环链表 代码 ...

  5. QBImagePickerController 用法

    // // ViewController.m // QBImagePickerControllerDemo // // Created by Tanaka Katsuma on 2013/12/30. ...

  6. windows系统安装ubuntu后,grub中没有windows启动项

    我的问题: 安装系统时候,选择grub安装在sdb磁盘 http://forum.ubuntu.org.cn/viewtopic.php?f=139&t=474289&start=15 ...

  7. hdu 5113 Black And White

    http://acm.hdu.edu.cn/showproblem.php?pid=5113 题意:给你n*m的格子,然后在每个格子内涂色,相邻格子不能同色,然后给你每个颜色涂的格子的固定个数,然后可 ...

  8. C#程序设计基础——运算符与表达式

    运算符就是完成操作的一系列符号,它主要包括算术运算符.赋值运算符.关系运算符.逻辑运算符.条件运算.位操作运算符和字符串运算符. 表达式就是运算符和操作数的组合,如a*b+1-c.表达式主要包括算术表 ...

  9. yum命令常见方法

    yum check-update 检查可更新的所有软件包 yum update 下载更新系统已安装的所有软件包 yum upgrade 大规模的版本升级,与yum update不同的是,连旧的淘汰的包 ...

  10. HDU 5452 Minimum Cut

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=5452题目大意: 给你一个图G,图中包含一颗生成树.要求只能删除生成树内的一条边,使得图不联通.问最小的删除 ...