Forum Moderators: not2easy
The only thing I can think of is that perhaps the author considered <font> more semantically-correct under those circumstances. Would that be a valid point in anyone else's opinion?
Strange.......must try it tomorrow when i get to work to see what effect it has......purely out of curiosity.
Webboy
Well, at least their developers are taking baby steps...
The 2 questions were, re: Search Engines "splitting" keywords
1. does <span>W</span>idget get split by the SE
The answer was yes apparently this gets split and read as "W idget"
2. the same question regarding <font>W</font>idget.. was that font doesn't split the word..
I don't know if it's as clear cut as that, but if the company are "keyword optimising".. that could be another reason?
but even so if it is the case, my feelings are that <span> shouldn't break the word anymore than <font> they're both inline.. but I suppose if that is the case it's because it's a legacy element that they(SE's) can deal with ;)
Suzy
The CSS:.tbltitle {
font-family: arial;
font-weight: bold;
color: #000080;
}And the HTML:
<font class="tbltitle">Search Results:</font>
The content of the <font> tag was not keywords, and the whole line was wrapped in the same <font> tag (no separate styles for the same word). A table of search results appeared below the line.
I just don't get it - I mean, CSS and <font> mix about as well as lightning and a swimming pool! ;)
...choster?.. who said (I'm sorry no disrespect intended.. but it's the new posting format can't refer back) that at least they're starting to take their first baby steps in which case I concur.. it's a start.. :)
thanks for the post though it brought 2 x niggles into perspective.. for me anyway...
Suzy
[added] it was indeed choster in msg#6.. sorry for confusion.. must learn to open a new window ;)
also added:
CSS and <font> mix about as well as lightning and a swimming pool!hehe - agreed!
[/added]
it's just us newbies have to learn through experience and through searching experts like yourselves... ^^
bottom line...css rocks with span and div... XD
<p>this is just a test</p>
p {
text-align: center;
color: #ffffff;
text-decoration: none;
}
<div class="test">this is just a test</div>
div.test {
text-align: center;
color: #ffffff;
text-decoration: none;
}
wouldn't both be the same? ;-/
That's what he meant by "less code" :)
However, you raise another question:
<p>this is just a test</p>
p {
text-align: center;
color: #ffffff;
text-decoration: none;
}<div class="test">this is just a test</div>
div.test {
text-align: center;
color: #ffffff;
text-decoration: none;
}
As far as layout goes, they would not be the same. You would get a 1em space (margin) between the paragraphs, whereas the divs would be flush one against the other.
I hadn't thought about the divs going flush with one another, but what I was addressing was the apparent implication that the <p> tag is obselete or in some way inferior to <div>. Maybe I mis-read the intent of ktwilight's post, but all I meant to say was that there certainly are cases in which <p> is simply the better tag to use. My rule of thumb, which I expect most of us share, is to use <div> for layout, and put most text in <p> tags.
What kind of issues would be caused by using a 'class' in the <font> tag as oposed to the 'span' tag?
I can't think of any "issues," so to speak, except that the <font> tag is deprecated and your pages won't validate to Strict standards. If you're starting with fresh pages, just get rid of <font> altogether. If you're working on a lot of existing pages, using CSS to style <font> tags may help in the transition process, unless of course you want to go in and give them all a class name at the same time. In that case, you'd just change them all to <span> while you're at it.
And, a mass search-and-replace tool would help do a lot of the tedious work of updating existing pages.
<edit>
Like, when you want a paragraph :)Precisely - and yet there was a time that I used a single <font> tag at the beginning of a page and used nothing but <br> to create my "paragraphs" - oh, horrors of my early efforts! ;)
i'm well aware of the spacing that <p> creates... *nods* that's why i use <span> tag for my paragraphs, and <div> for my layout... ^^
so...is it wise to using the <span> tag? or, it would be better to use <p> and adjust the spacing using CSS?
If it's one or two words in the middle of sentence (or even one or two sentences in the middle of a paragraph) that you wish to highlight in some way (an inline element) then recommended practice would be to use span tags.
SuzyUK> <blink class="182">?!
-C
[edited by: SuzyUK at 2:46 pm (utc) on May 6, 2004]
[edit reason] URL snipped [/edit]
You are confusing the html tag itself with the application of the style rules for <p> contained in the browser's default style sheet.
If you style the <p> tag yourself, you can give it as much or as little spacing as you like.
And <span> is for inline elements. If you want to create a block level element with no inherent semantic value, then you can use a <div>.