1 Div and Span Sun Nov 14, 2010 6:11 pm
Unknown Data
Registered Member
Div and Span Learn CSS - part 10 |
The elements <span> and <div> We have seen that through the attributes class and ID can we specify special properties for selected elements. Now we see application of <span> and <div>, these two elements are usually used in conjunction with the attributes class and id. The <span> element Normally are we using the <span> elemtn to mark or highlight special content. Imagine that we got following text: The last year were I very busy with my work and didn't sleep well in long time. Whith this example do we want to highlight year, busy and didn't. The source could would then look like this by using HTML.
The <div> element The <div> element is normally used to style big things such as boxes etc. Templates is also often builded with <div>'s. We are using the same text as before, but this time, do we want the whole text red with a black background. It can be done like this.
In contrast to the "class" and "ID", may <span> and <div> not stand "alone"! It was another lesson - let's then go futher. |
Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators. |