What languages can be used to write a webpage?

The only "real" webpage languages are HTML and XHTML (XML-flavor of HTML).

However, there are tons of languages that can be used to generate this HTML dynamically like ASP, JSP, Perl, C (yeah I know, nobody does that anymore 😛), ...; for those languages there is also tons of APIs and frameworks to "enhance" the basic functionalities.
 
HTML & XHTML are the only ones for the writing of web pages, however they are often infused with flash, javascript, java, ajax, & a ton of other languages.