(or style="border: 1px solid black") (or 6px dashed #ff0000) (or...) Generally, using the style attribute lets you insert whatever values you'd use in CSS for a given tag, if you're not going to use a stylesheet outright (which you totally should, but I get that there are such things as boss constraints). The table border attribute just widens or narrows the browser's native table rendering, which varies quite a lot between browsers, but a bunch of them use the nasty web-circa-1994 metallic shadow look.
'Potential'
Buffistechnology 3: "Press Some Buttons, See What Happens."
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
The other day, our client decided this form I'm working on should have a red 'OK' button. After googling I learned how to do that using CSS. Unfortunately, that caused other default behaviors of the button to go away (such as the border changing color when the user mouses over it), but the article showed how to recreate them using CSS.
Generally, my rule for CSS has been "use the stylesheet if you're doing something more than once." Perhaps I should use the stylesheet at other times too.
My rule for CSS is "use a stylesheet," but I'm easily confused.
My rule for CSS is "use a stylesheet,"
Yeah, this. No styling in content markup -- you may think you're only going to use a red button in one place (but, REALLY? silly client. Red means cancel, not OK), but then you end up having to recreate it each your wacky client decides it should be on another page too... If you never do that stuff in the body, you don't have to remember which place it is, plus you're ready to not screw things up when your IE-only app ends up being used in other browsers or totally different devices sometime 3 versions down the road.
CSS stands for Cascading Style Sheets, so it's kinda all inherent.
However, more to the point, I hate using styles in the HTML page. I find it clunky and confusing, and therefore tend to do the bad thing and use deprecated HTML instead. Bad coder. Bad, bad, coder.
HTML = model
CSS = view
JavaScript = controller
The three things should be as unmixy as possible.
ita, you FONT COLORer you!
HTML = model
CSS = view
JavaScript = controller
What do you do if you have formatting and Javascript in XML?
Oh, come on. What's a t u between friends?
From a practical perspective, if you keep your structure (HTML) and style (CSS) separate, you know which file to edit when you have to go back 6 months later and change everything from blue to red. Speaking as someone who has spent more time than she'd like to think about trying to figure out just which file she needed to fix.