![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
What is the difference between <div> and <span>? I know that the technical definitions are that <div> is for "block" elements, and <span> is for "inline" elements, but what is the practical answer to this? |
|
I know that a paragraph <p> is a block element, but what is the relevance? |
|
And how should I differentiate whether I need to use a <dev> or <span> tag? |
|
I often just assign a class to whatever element contains the element I want to format. For example, if I want to format some text, I often esign the class with the table in mind, and then apply the class I create to the <td> tag. |
#3
| |||
| |||
|
|
What is the difference between <div> and <span>? I know that the technical definitions are that <div> is for "block" elements, and <span> is for "inline" elements, but what is the practical answer to this? I know that a paragraph <p> is a block element, but what is the relevance? And how should I differentiate whether I need to use a <dev> or <span> tag? I often just assign a class to whatever element contains the element I want to format. For example, if I want to format some text, I often esign the class with the table in mind, and then apply the class I create to the <td> tag. Why and when should I be using <div> and <span> elements? Thanks. Donnie First, you are right that a div is block and a span is inline, but those |
![]() |
| Thread Tools | |
| Display Modes | |
| |