views:

117

answers:

4

I'm new to these languages.

A: 

Very roughly (as your question is a bit rough as well :): PHP is in variable names and constants, but nowhere else; javascript is completely (correct me if I'm wrong); HTML is not, however the recommended (and starting with XHTML 1.0, required) form for writing tags is lowercase.

Pekka
+7  A: 

HTML is not case-sensitive (XHTML is, though).
PHP respects case in variable names, but not functions.
Javascript is case-sensitive.

Michael Petrotta
Yeah, that's my only beef with PHP. I love it, but the lack of case sensitivity in functions bugs me.
BraedenP
About xhtml,why <BODY> and <body> both works?
web
@web: <BODY> and <body> both work, yes, but <BODY> is considered invalid mark-up.
Furutsuzeru
But when I say if it's case sensitive,the other version will not work.
web
@web: browsers are forgiving of invalid markup. That doesn't make it valid.
Michael Petrotta
If I define doctype this way,is it html or xhtml?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
web
@web: That is XHTML.
Michael Petrotta
@web It doesn't work. Serve your XHTML as XHTML (`application/xhtml+xml`) and you will see an error.
Eli Grey
+2  A: 

PHP variable names are case sensitive, but the names of functions are case insensitive. Why is this?PHP is a language that's designed to let you write a web page template into which you can insert additional tags to call up the functionality of PHP, and it originated in the days before xhtml when tags were case insensitive. So it's natural for those additional tags to be case insensitive too.

JavaScript is Case Sensitive A function named "myfunction" is not the same as "myFunction" and a variable named "myVar" is not the same as "myvar".JavaScript is case sensitive - therefore watch your capitalization closely when you create or call variables, objects and functions

HTML As regards to tag and attribute names and most keyword-like attribute values, HTML is case insensitive. You can, for example, type TITLE or Title or title or even tItLE if you like.

sandy101
Except upper-case tags are considered invalid in xhtml (which wasn't part of the question, but still...)
David Thomas
A: 

One of these is not like the others... HTML is a markup language, as Wikipedia explains "A system for annotating text". Php and Javascript are programming languages. Programming languages "express computation". These constructs are very different, yet easy to cast into the same type because they are interwoven in a typical web application.

The other answers break down the differences, but just want to be clear there are two apples and one orange in your list.

Christopher Altman