The Translation API v3beta1 has the ability to take both plain text or HTML as input. Where there is HTML, the API does not translate any of the HTML tags in the input and the output correctly retains the HTML tags with the plain text translated in between.