This question is an exact duplicate of:
We run a Bible site where users can request arbitrary passages (e.g. John 3:16). We would like to start showing passages highlighted within their context (e.g. John 3:16 would show all of John 3 to users, with the requested verse visually distinguished from the context, as this is more useful for Bible study. However, we still want to only display the requested passage to search spiders, as this is more useful to search engine users (and reduces our already-significant potential problems with duplicate content).
As a concrete example of why it's important to display only the exact text of a verse in question to Google: it's common for searchers to search for a familiar phrasing in order to find the actual passage reference. If you search Google for
esv for god so loved the world you'll get results for John 3:16, with the snippet providing the text of the verse in question. If we canonicalized John 3:16 to all of John 3, we would lose this. However, when a user visits the page, it's most useful to see the verse highlighted in its larger context. Hence, switching the content from John 3:16 to John 3 upon page load.
While I recognize that this is not a duplicitous technique but in fact a better UX, will Googlebot recognize this? Will I get penalized for doing this?