don't click here

HTML and Styles

Discussion in 'Technical Discussion' started by saxman, Nov 5, 2008.

  1. saxman

    saxman

    Oldbie Tech Member
    DIE, I want these dang things to die and burn in hell. I'm pulling my hair out and my friend is laughing at me writing this right now.

    Anyhow, this book is telling me to create a style that will make bold text yellow. How the heck do I do this. Please help me before I kill my friend for making me do this.

    Josh, laugh now, but your life is on the line.
     
  2. Xkeeper

    Xkeeper

    lgkdfvlbjepasvdjzcvpaaaaaaaaaaaaaaaaaaaaaaaa Researcher
    1,509
    10
    18
    the bone zone
    current-project-fart
    Code (Text):
    1. <style type="text/stylesheet">
    2. b { font-color: yellow; }
    3. </style>
     
  3. NickW

    NickW

    Member
    Code (Text):
    1. <style type="text/css">
    2. b, strong
    3. {
    4.     color: #FFFF00;
    5. }
    6. </style>
    Should do the trick if you are using the b or strong tag to bold your text.
     
  4. Digital Xeron

    Digital Xeron

    [An error occurred while processing this custom ti Oldbie
    187
    1
    0
    Unicomplex One, Canada
    Digibase Operations (TSZP)
    Just a tip to adhere to "current day standards":
    In new web page creation, try not to use , it's deprecated and won't port to XHTML right. Use instead.
     
  5. Hivebrain

    Hivebrain

    Administrator
    3,049
    161
    43
    53.4N, 1.5W
    Github
    is not deprecated. If it won't "port to XHTML" (whatever that is), then there's something wrong with XHTML.
     
  6. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,240
    974
    93
    Long-term happiness


    Emphasis mine =P
     
  7. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    They should stop ruining html with all this shit.
    What are they going to replace and with, then? <textwritteninadiagonalfashion> and <letsputalinebelowwhatIwrite>?

    edit: stupid word filter that capitalises the I
     
  8. NickW

    NickW

    Member
    =
    = Use CSS (text-decoration: underline)
     
  9. Galaxia

    Galaxia

    Member
    718
    0
    0
    Manchester, England
    degloving infants
    There was nothing wrong with or etc. in the first place...
     
  10. Xkeeper

    Xkeeper

    lgkdfvlbjepasvdjzcvpaaaaaaaaaaaaaaaaaaaaaaaa Researcher
    1,509
    10
    18
    the bone zone
    current-project-fart

    It was the same idea as changing <font> to be "use <span> with styles".


    It's this XHTML purist bullshit for people who are blind/deaf/decrepit who would never even use 99% of the websites that adhere to stanards. It's stupid.

    I mean, fuck, they were considering replacing "<img>" with a more general "<object>" tag. The only reason they didn't was because of TOTAL OUTRAGE from people.
     
  11. saxman

    saxman

    Oldbie Tech Member
    I got it working. Thanks for the help! Unfortunately you guys weren't quick enough. Josh is... taking a nap.
     


  12. Oh hells no. It was bad enough when they depreciated the
    tag. They can have the tag when they pry it from my cold, dead, hands.

    I hate XHTML, I try to comply to it, but I hate it nonetheless.
     
  13. saxman

    saxman

    Oldbie Tech Member
    Isn't <font> not deprecated? I read something about that... oh and <br />. I hate that they've deprecated some of these things.
     
  14. FraGag

    FraGag

    Tech Member
    According to what I've seen, HTML is not a language to describe the format of a web page, only the contents. You think you can use pure HTML to do simple formatting as in a text processor, which is not the case; this is a job for CSS. I find it a bit annoying to write more to do the same thing "better," and I really wish we could use custom elements (or at least have a good set of elements in the beginning), but in the end, CSS can usually do the job. If I'm crazy enough, I'll use XML + XSLT.

    If you want to put some text in italics, it's to put an emphasis on it, so you use . If you want it bold, it's to put a strong emphasis on it, so you use . If you want it underlined, "you're doing it wrong," because traditionally, underlined text is associated with hyperlinks. If you really want to underline something, you could just use and style it appropriately.

    If you want to know what's deprecated and what's not, look at the index of the HTML 4 elements.

    I personally hate <br> and prefer <p> and <div>. The only place you'll see me use <br> is in links, because browsers don't support XLink enough yet (in before XLink is bad — I just want to be able to put a link on a block element instead of an inline element).

    Also, I would have liked to see CSS progress faster. There are several interesting features in CSS 3 that wait to be implemented and used... And goddamn Internet Explorer will force webmasters to add fallback mechanisms.

    I agree; <img> is already too well established, there's no way people will start using <object>, especially with (early versions of) Internet Explorer's screwy handling of <object> elements.

    My rant is over, feel free to hate me now.
     
  15. Nibble

    Nibble

    Oldbie
    While stylesheets do add more complexity, in the end it also adds more flexibility as well.

    It's the reason you can change the theme on a forum. On modern forum software, a theme is simply a set of stylesheets and images that are applied to the exact same HTML (ideally, anyway). The idea is to separate content from formatting.
     
  16. Agreed. It's that much more easier to change a single line in a CSS file instead of changing it in 100+ files. However, I started with HTML back in the days when using <table> for layouts were all the rage. Hell, I even have a really old HTML4 book that is full of crap that would be taboo today. Switching to a <table> free layout required me to actually get off my ass and learn CSS, and for that I will never regret it. I even took a old layout that I made years before and converted it to pure CSS. The end result was remarkably smaller HTML code.