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. 03:计算(a+b)/c的值

    总时间限制:  1000ms 内存限制:  65536kB 描述 给定3个整数a.b.c,计算表达式(a+b)/c的值,/是整除运算. 输入 输入仅一行,包括三个整数a.b.c, 数与数之间以一个空格 ...

  2. bzoj2096: [Poi2010]Pilots

    Description Tz又耍畸形了!!他要当飞行员,他拿到了一个飞行员测试难度序列,他设定了一个难度差的最大值,在序列中他想找到一个最长的子串,任意两个难度差不会超过他设定的最大值.耍畸形一个人是 ...

  3. operation 多线程

    2.Cocoa Operation 优点:不需要关心线程管理,数据同步的事情.Cocoa Operation 相关的类是 NSOperation ,NSOperationQueue.NSOperati ...

  4. JS获取select选中的值

    var oSel=oFl.getElementsByTagName('select')[0]; oSel.onchange=function(){ var indexselect=oSel.selec ...

  5. nginx+uwsgi+WSGI applications

    uwsgi一个专业的部署运用的工具,不仅能够部署Python运用,还能够部署其他运用比如Perl,Ruby等 uWSGI 安装: pip install uwsgi WSGI application( ...

  6. RHEL/CentOS 6.x 系统服务详解

    PS:RHEL/CentOS 6.x的系统服务比5.x系列的要多了很多新面孔,估计很多童鞋不甚理解,网上这方面资料也很少.理解这个对运维人员是必要的,因为开启不必要的服务越 多,系统就相对越不安全.不 ...

  7. 【Java】Java Servlet 技术简介

    Java 开发人员兼培训师 Roy Miller 将我们现有的 servlet 介绍资料修改成了这篇易于学习的实用教程.Roy 将介绍并解释 servlet 是什么,它们是如何工作的,如何使用它们来创 ...

  8. Spring基础介绍

    Spring属于轻量级还是重量级框架?   这需针对使用Spring的功能而言,比如我们常使用其核心服务整合SSH,这样则为轻量级. 如果使用其大部分服务则可以理解为重量级.   普通JAVA项目环境 ...

  9. 【HDOJ】1760 A New Tetris Game

    博弈,主要是求SG值.终于做出点儿感觉. /* 1760 */ #include <cstdio> #include <cstring> #include <cstdli ...

  10. 「Poetize7」Freda的访客

    描述 Description 小猫们看到蛋糕比饼干大之后,普遍认为蛋糕比饼干要好>.<.所以,如果Freda 给了第i 只小猫蛋糕且这个小猫是第一个吃到蛋糕的,那么就必须给第i+2,i+4 ...