Styling html text without CSS

前端 未结 6 1287
死守一世寂寞
死守一世寂寞 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:30

    Great Question,

    There are a couple ways that you could go about doing this. One way to go about doing this is by using inline css. Inline css looks like this: <p style="color:red">

    The Second way about going this is by seeing if your template has advanced settings under the settings. There you can edit the css file and then reference it in the html!

    The second way will save you tons of time and help your blog look nice!

    Your Welcome,

    Oak

    0 讨论(0)
  • 2021-01-02 08:32

    You may use the span style, div styles for styling the web page with out using cascading sheets.

    Ex: <span style="color:#abc123;"> NAME </span>

    0 讨论(0)
  • 2021-01-02 08:37

    CSS in a separate file may not be the answer but you may be able to include it in the head of the HTML file like so:

        <doctype HTML>
        <html>
        <head> <title>My title</title>
            <style>h1{
                color:red;
                font-size:20px;
        }
            </style>
        </head>
        <body><h1>My large text heading</h1>
         <script>alert("Hi , I'm in javascript inside the HTML File");</script>
        </body>
        </html>
    

    That's the easiest way and by doing so the code is in all one place ,inside the head of the HTML file in a style tag and can be edited easily. FYI Javascript functions can be added by placing them inside a '<script >alert("Hi , I'm in javascript");</script>' tag like above HTML code shows.

    0 讨论(0)
  • 2021-01-02 08:39

    You can also add <a href="thepagelink.html" style="text-decoration:none;"></a> This would remove the underline and any formatting on the link. You can then also add your own styling e.g <a href="thepagelink.html" style="text-decoration:none;" style="color: #07781C;"></a>

    0 讨论(0)
  • 2021-01-02 08:41

    Add CSS as a style directly to the tag you want to format.

    EX.

    <p style="width:20px;height:20px;background-color:#ffcc00;">The contents go here</p>

    0 讨论(0)
  • 2021-01-02 08:53

    With HTML alone, without any CSS, you can set

    • font family with <font face=...>
    • font size with <font size=...> (though just to a few values)
    • text color with <font color=...>
    • italic typefact with <i>
    • bold typeface with <b>
    • superscripts with <sup>
    • subscripts with <sub>
    • underlining with <u>
    • forced line breaks with <br>
    • allowed direct line break points with <wbr>
    • allowed hyphenation (word division) points with &shy;
    • no line breaks with <nobr>
    • 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 <marquee>

    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.

    0 讨论(0)
提交回复
热议问题