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.
While U.S.S. and H.M.S. are not italicized, they are capitalized:
If, however, H.M.S. or U.S.S. is part of a title, the whole thing is italicized:
If you follow these simple rules, you will never have to wonder how to write ship names again.