Is there a way to show text a different colour ie Colored Text, the first word blue then the rest black Like above blue then the rest black. I want to make it so that the title of my boxes can be 2 different colours. Or is this a javascript thing??
<span style="color:blue;">Colored</span>Text, the first word blue then the rest black Code (markup): or <span class="blue-text">Colored</span>Text, the first word blue then the rest black Code (markup): then add .blue-text {color:blue;} to your style sheet.
The best, most standards-compliant to implement this would be to do the following: <p><color="blue>blue text</color><colors="blue,green,red">This will do a gradient of blue green and red text</colors></p>
This is the first time I am seeing the tag "color". I tried to use it but it doesn't work (i have the latest firefox btw) :/ Maybe it works with a certain javascript?
maybe means the <font> tag as <color> is not listed in w3schools.com/html5/html5_reference.asp or w3schools.com/tags/default.asp But, it is not supported in HTML 5 and deprecated in HTML 4, best not get to used to using <font>.
Hi guys thanks for the answers but its not what I want. OK I am using phpld and for instance the title in the widget is in a h3 tag so I want it to display the title in 2 colours. So I have <h3>{title}</h3> The {title} it brings maybe 1 word or up to lets say 10, the title is done in back-end and rendered on the front end via the {title} tag, I only want the first word colored the rest black. Can this be done with css or will it require JavaScript maybe.
Just googled that for you. I hope this is the solution: http://stackoverflow.com/questions/...half-or-get-as-close-to-the-middle-as-posible
That looks like what I am looking for THANKS for taking the time. I had search but obviously I did not use correct search terms. Now just need to figure out how to use it correctly. THANKS to everyone who took the time to answer this thread
I would assume he did, since there is no COLOR tag, even in the latest spec. Even if it did exist, you shouldn't use it, since that's PRESENTATION, and as such has no malfing business in the HTML in the first place -- just like the STYLE attribute used in the example or even class="blue" for that matter if you're actually going to bother coding properly practicing techniques like separation of presentation from content or semantic markup. My question would be WHY is it blue? What's so special about it? Does it even need a class or could you have the span inherit off the parent wrapper like the H3 in the examples? HTML is for saying what things ARE, and "blue" doesn't count as one of those. You should be saying WHY it is different, not HOW. How is either the user agent or CSS' job! Though it wouldn't surprise me to see that type of asshattery on the WhatWG's site, given the steaming pile of manure they vomited up we've come to know as HTML 5 -- setting coding practices back a decade or more to the bleeding edge of HTML 3... undoing all the progress STRICT has offered us the past 14 years. But even they: http://www.whatwg.org/specs/web-apps/current-work/multipage/section-index.html#elements-1 Have no color tag. No such thing, never has been. There's the color ATTRIBUTE, but nobody has any business using that after 1998 (well, more realistically 2003 which is when we could finally kick nyetscape 4 support to the curb)-- hence it being deprecated in the most recent type of document you should be using; HTML 4.01 STRICT or XHTML 1.0 STRICT.