There are multiple ways how the licensing can be made machine-readable in HTML documents. A consumer (e.g., a search engine) might support only some (or none) of them.
Two popular ways:
Link type: license
HTML5 defines the license
link type.
This always specifies the license for the main content of the document. So it’s not possible to use this if only parts of the main content are licensed, if different parts have different licenses, if the whole document should be licensed (not only the main content), or if the main
element can’t be used (then it’s not clear what belongs to the main content).
Example:
<a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="external license">CC BY-SA 4.0</a>
Note that Creative Commons’ Choose a License form creates this markup for you by default.
RDFa & CC REL
RDFa is a syntax that extends HTML, CC REL is a vocabulary from Creative Commons.
This allows you to specify the license of every part (image, paragraph, sentence, table, …) in the document.
Note that Creative Commons’ Choose a License form creates this markup for you if you provide additional details in the "Help others attribute you!" step.
Relevant pages from creativecommons.org: