using SharePoint 2010 web editor
I created a (sub-menu) page with title CO<sub>2</sub>. When rendered in browser, the title of the page is: CO<sub>2</sub> whereas the menu item shows CO2.
Apparently it is escaping the HTML tags in page but rendering correctly inside the menu.
How to make the page title looks same as menu item?
No tags are recognized in a title element by HTML rules (and by browser practice); they are indeed rendered as such. In principle, you can use special characters like “₂” SUBSCRIPT TWO U+2082 in a title element. You can even denote them using character references:
However, only some fonts support SUBSCRIPT TWO, and it is quite possible that the rendering of title elements e.g. in a browser top bar or tab label uses a font that does not support to it. In that case, a rectangle, vertical bar, space, or other generic indicator of missing glyph probably appears.
Note that the appearance is usually not quite the same as in the menu, since browsers implement
supby reducing font size and putting the glyph in a lower position. Only by accident would this coincide with the design of “₂” in a font. But if the texts are displayed in two different fonts, as they probably are, this is usually not a serious problem.