In computer science, [formal language](https://en.wikipedia.org/wiki/Formal_language) is just a set of strings, usually infinite and often described using rules (two common versions of those rules are [regular expression](https://en.wikipedia.org/wiki/Regular_expression) and [formal grammar](https://en.wikipedia.org/wiki/Formal_grammar)). Note that this means that all a language needs is [*syntax*](https://en.wikipedia.org/wiki/Syntax_%28programming_languages%29), language doesn't need to describe what each valid string means (that's called [*semantics*](https://en.wikipedia.org/wiki/Semantics_%28computer_science%29)). Now, this means that programming languages are formal languages that also have semantics, which describes some computation. And for example XHTML is a formal language, whose semantics describe (roughly and informally) how a hypertext document looks and behaves. XML is still a language, even though it doesn't have semantics itself (but many languages derived from XML do, like XHTML and XAML).