Proper names of ships and other vessels should be italicized just as titles are. Keep in mind that although ship (or vessel) names should appear in italics, prefixes such as U.S.S. or H.M.S. should not.
These rules can be applied to the names of specific spacecraft, aircraft, and (according to some style guides) trains as well. However, you don’t need to italicize brand names like Boeing or Amtrak.
Here’s a tip: Want to make sure your writing always looks great? Grammarly can save you from misspellings, grammatical and punctuation mistakes, and other writing issues on all your favorite websites.
Let’s all go riding on the Marrakesh Express.
The Challenger exploded over Florida in 1986.
Robert Ballard was obsessed with finding the Titanic wreckage.
The Enola Gay dropped the atomic bombs on Hiroshima and Nagasaki.
While U.S.S. and H.M.S. are not italicized, they are capitalized:
Horatio Hornblower sailed on the H.M.S. Indefatigable.
John built a small model of the U.S.S. Voyager, and he now has it on a shelf in his room.
If, however, H.M.S. or U.S.S. is part of a title, the whole thing is italicized:
In grade school, I was a maiden in the musical H.M.S. Pinafore.
If you follow these simple rules, you will never have to wonder how to write ship names again.