HTML output line numbers separateable from source code?

When creating HTML output with line-numbers from source code, it is not possible to mark and copy snippets of code in browser, because line-numbers are mixed with source text.

Is there any way to separate line numbers from source in HTML output, to allow copy / paste of source?

Edited by Ghost User