hello i wanted to ask what the use of the span clause is when span takes no arguments like in: <div id="pageHeader"> <h1><span>aaa</span></h1> </div> thks
The span tag in your example will do nothing. It could be there for a css image replacement technique though. (Most likely if being used on a h1 tag). Read this: http://www.mezzoblue.com/tests/revised-image-replacement/
Chances are it's a poorly implemented (and ultimately) inaccessible image substitution technique. Also note that a heading is a block-level element and doesn't need a DIV wrapped around it. Furthermore, just put the SPAN adjacent to the heading text, rather than around it, then set the heading's position to relative, and absolutely position the SPAN to the top and left.
When a site has used span tag without an ID or class, it has simply been styled by default in the css file. All span tags without the identifier will appear the same.
Whilst that is true, it is not necessarily the case. For example, in the OP's code that they gave us you could style that specific span like so, without having to give it a specific class or ID. #pageHeader span { someStuff: here; }
Uhh...no it's not HTML <span> small text </span> <div id="pageHeading"> <span> big text </span> </div> Code (markup): CSS #pageHeading span { font-size: 30px; } Code (markup): Note how the content in the two spans don't display the same and yet there is no argument applied to either spans...
Yes I did. you did not read my post correctly. "it has simply been styled by default in the css file". It does not matter where you put the style code, on the page, or in a css file, the point is this. All items within the plain span tag <span> will appear as defined in the style code for the tag span. Tags do not have to be labeled, and if you look at the original post of this thread you will see the code referenced. thosecars82 clearly states, "i wanted to ask what the use of the span clause is when span takes no arguments". The span tag has been styled in a css file or in style block above it somewhere.
I guess it sounded like you were saying spans have a default css styling. <span> has the same "default" styling as <div>: none.