A specification (also commonly referred to as "spec") is a description of a defined technology and the resources it offers.
When the asset is programming, to know the resources of the language you are planning to use is of major importance. The features offered by a language may be critical in its use by developers and can cause severe problems for the novice ones that are starting to learn the language.
There are many languages and, therefore, each one is documented in a different way. Java, for example, offers a huge amount of information in different formats, either to download or to read in the browser. PHP, as a different approach, will offer the php.net site that’s also a great source of information.
This is an example for Java SE7 specification: https://docs.oracle.com/javase/specs/jls/se7/html/index.html
And here you can start the path in PHP: https://php.net/
The specification may also determine the adoption of the resources in different platforms. If you think about W3C’s specs on web-based technologies, you may remember that many of them depend on adoption of the browsers, since, unlike the examples of Java and PHP where the language resources are developed with the guidance of an enterprise or a group, HTML5 can only be implemented today in a signicative way by the major browser maintainers, like, for instance, Mozilla Foundation (for Firefox) and Google Inc. (for Google Chrome).
An example for this spec can be found at W3C’s site, that’s also full with documents for many others technologies, like XML and Web Architecture. Here is an example of HTML 4.01: https://www.w3.org/TR/html401/