| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
css is for divs
Join Date: Feb 2003
Location: Norwich
Posts: 4,469
|
Tags
Considering making an interface for inserting text with basic formatting options (similar to the Post New Thread page here on DT) so that the user could apply <b> and <i> tags to text. What I'm wondering is how this would work behind-the-scenes - when the code is actually created would it have <b> and <i> tags in it that have been restyled with css, or would it be better to have <span> tags with classes applied to the text? I guess what I'm getting at is; is it ok to use <b> and <i> tags in XHTML? And wile I'm a-wondering, what about the <strong> tag? Chairs |
|
|
|
|
|
#2 (permalink) |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,200
|
no point using a span when there's already bold and italic tags available. I always use <strong> and <em> these days. To be honest I can't remember whether <b> and <i> have been depreciated or have just gone out of favour with the pedantic...sorry...semantic crowd. Depending on the users, you might want to only allow them to enter pseudo code like forum's use - [b], [i] for example and then use some sort of php string replace to change them into (x)html. you don't really want your users to be able to enter any (x)html they like do you. they might fancy some blinking text. That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
![]() |