Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Why is the HTML code <style type="text/css"> in Tumblr creating a problem?

I am trying to do a custom theme and learning a little bit at a time. I read one book (online) on how to do it and I had copy and pasted all the demo code from here. For some reason, after this <style type="text/css"> is code, a large amount of the font turns red until </style>. If I ever try to type this out myself, it will only let me write up to <style type="> and then I cannot write anything anywhere after this ... I don't know a whole lot about HTML, I just want to know what's going on here. Every tutorial I've looked at so far uses this code, so why am I having no luck? Is the code supposed to be red? The red code doesn't seem to do anything to my blog as it should.

4 Answers

Relevance
  • Anonymous
    8 years ago
    Favorite Answer

    "<style type="text/css">" is the opening CSS tag. "</style>" is the closing style tag. These must be between the "head" tags of your HTML file(s) and include ALL the CSS rules that appear between these two tags.

    Ron

  • ?
    Lv 4
    5 years ago

    Type Text Css

  • Chris
    Lv 7
    8 years ago

    You don't put HTML in between the style tags but CSS rules. It looks like this:

    <style type="text/css">

    #menu a {

    color: #fff;

    }

    #menu {

    height: 30px;

    }

    </style>

    This will set the menu element to a height of 30 pixels, and the text of all links within will be colored white.

    I'm guessing tumblr does what's called code highlighting. It parses the code and uses different colors for different parts of the syntax to show errors and make things more readable.

  • Anonymous
    5 years ago

    Would like to find out more about this as well

Still have questions? Get your answers by asking now.