The following are writers' guidelines:
Names of specific ships and other vessels are both capitalized and italicized (or capitalized entirely - "all caps" - in text documents denying italics such as email, use of a mechanical typewriter.) Note that when such abbreviations as USS (United States ship) or HMS (Her|His Majesty’s ship) precede a name, the word ship or other vessel type should not be used. The abbreviations themselves are not italicized.
More recently, naval ships have been assigned a pennant|hull number, consisting of a serial number sometimes preceded by a combination of letters (indicating the type of ship.) If used in place of a name, the number should be italicized. N.B. Smaller ships such as landing craft and submarine chasers may be individually numbered but not named.
Where necessary to avoid confusion between vessels of the same name, the numbers should be included at first mention but should not be italicized.
If disambiguation is not possible using pennant|hull numbers, the year of launch or renaming should be included in brackets after the name and not italicized
When a pronoun is used to refer to a vessel, the neuter it or its (rather than she or her) is gaining preference. But it is perfectly acceptable to follow tradition where a ship or other vessel is referred to as she or her.
Despite a growing tendency to generalise and debase, ship types should be used with precision; an aircraft carrier is not a battleship despite her ability to wage battle. Generic terms such as warship should be used carefully.
Type prefixes e.g. STS (sail training ship), MV (motor vessel) and country specific prefixes e.g. HMAS (His|Her Majesty's Australian Ship) should be all capitals without periods or slashes e.g. SS (steamship) but not S.S. nor S/S. An exception for the slash is permitted for variants e.g. HMCS/NCSM (His|Her Majesty's Canadian Ship/Navire Canadien de Sa Majesté)
The first mention of a ship should include type or prefix. For subsequent use the definite article before a ship's name despite declining usage is always acceptable, except before a pronoun
leaving Gibraltar, the HMS Victory led the fleet
Also, some ship names particularly in languages other than English contain the definite article e.g. L'Orient, La Splendide; these should never be preceded by the English definite article.