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

最新文章

  1. 让一个图片在div中居中(四种方法)
  2. JVM-加载,链接,初始化
  3. 深入springMVC源码------文件上传源码解析(下篇)
  4. Windows Azure Cloud Service (37) 浅谈Cloud Service
  5. 10个出色的NoSQL数据库
  6. Front-end Developer Interview Questions
  7. 如何使用不同参数组合生成独立的TestCase函数(Python)
  8. 【性能测试】性能测试总结&lt;二&gt;
  9. managedQuery和query的区别,
  10. CheckStyle插件
  11. JeeSite 企业信息化快速开发平台
  12. 201521123028《Java程序设计》第4周学习总结
  13. docker入门(二)容器与镜像的理解
  14. JS学习笔记Day4
  15. python-思路整理-虚拟环境
  16. SQLServer 2008以上误操作数据库恢复方法—日志尾部备份
  17. 迪米特法则(Law Of Demeter)
  18. asp.net单击头模板中的checkbox,实现datalist中所有chebox的全选和取消
  19. IOS多线程之线程属性的配置
  20. java boolean 值在内存中占几位?

热门文章

  1. Cookie的基本使用
  2. 关于android:configChanges的属性
  3. Asp.net MVC分页实例
  4. 转:2014年最酷的30个JavaScript库
  5. LINUX单网卡绑定多个IP
  6. hadoop 异常 datanode未启动
  7. JQuery 判断IPad、IPhone、Android是横屏还是竖屏(Window.Orientation实现)
  8. Sort it all out
  9. TOP命令解析
  10. input 标签左对齐