Styling html text without CSS

前端 未结 6 1336
死守一世寂寞
死守一世寂寞 2021-01-02 08:20

I would like to html code part of my tumblr page, but in the context, I can\'t add any css. Is there any way to format text size, font, color, etc. without using css? I look

6条回答
  •  醉酒成梦
    2021-01-02 08:53

    With HTML alone, without any CSS, you can set

    • font family with
    • font size with (though just to a few values)
    • text color with
    • italic typefact with
    • bold typeface with
    • superscripts with
    • subscripts with
    • underlining with
    • forced line breaks with
    • allowed direct line break points with
    • allowed hyphenation (word division) points with ­
    • no line breaks with
    • text alignment in some elements with align attribute or (for vertical alignment) valign attribute
    • background color and/or image with bgcolor and background attributes in body element and in table-related elements
    • automatically scrolling text with

      and some other formatting tools (it is somewhat debatable what belongs to text formatting).

      Although HTML5 drafts declare many of these as “obsolete” and “nonconforming”, they also require or strongly recommend (depending on element) that browsers continue supporting them, with the exception of nobr (which is well supported by browsers, with no signs of getting dropped).

      (HTML5 is a draft specification. It does not “support” anything; browsers do. Specifications may require support, but that’s just a normative statement, about how things should be.)

      If you can in fact use CSS at least in style attributes, then there are many more possibilities, though styling is then clumsy and limited.

      提交回复
      热议问题