HTML5, like any other version of HTML, is designed to define content and structure. You designate blocks of code with <pre> , <code> , etc., but you donโt use HTML to tell the browser something should look like, so there isnโt such an element to tell the browser syntax to highlight a block of code.
The syntax highlighting, thus, falls under the area of โโstyle, design, etc., which is processed by CSS. As suggested by NullUserException (there are some great links!), You can use JavaScript syntax to highlight the code for you on the client side (for example, the one on Stack Overflow), or do it on the server side, and output it to computer style HTML blocks from the server language.
source share