# Disable the String HTML methods (`ts-compat/no-string-htmlify-methods`) 💼 This rule is enabled in the ✅ `recommended` config. `anchor`, `big`, `blink`, `bold`, `fixed`, `fontcolor`, `fontsize`, `italics`, `link`, `small`, `strike`, `sub` and `sup` are the Annex B methods that wrap a string in an HTML tag. The markup they emit is legacy HTML: `` no longer renders in any current browser and `` is deprecated, while the methods themselves still exist in every engine, so this rule is not gated by browserslist. ## Rule Details This rule bans every read of those methods on a string, called or not. Examples of **incorrect** code for this rule: ```ts var name: string; name.bold(); name.fontcolor("red"); const toBold = name.bold; ``` Examples of **correct** code for this rule: ```ts var name: string; `${name}`; `${name}`; ``` ## When Not To Use It * The exact legacy markup has to be reproduced, tag and attributes included. * A property with one of these names is read on a value that is not a string, which is already allowed. ## Further Reading * [MDN String.prototype.bold()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/bold) * [ECMAScript Annex B, Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html)