On the process of formatting, I was reading a book in which it stated that one of the great reasons for CSS was to get rid of tags like <p> and allow full control over formatting. In the subsequent example, all the formatting was achieved using styles applied to div's. No p tags were used at all.
I am curious about this though, because no web site I have seen exclusively uses the div instead of the p? Do people just use the p because they are used to it? Or because it is convenient? Or is it just it is available - so it is handy to use it?Words, words, words - if you have a bunch of words strung together into sentences. And those sentences strung together into paragraphs then you need those paragraphs marked with P elements. In the same way headings need to be marked with the H elements.
Those people who suggest just DIVs and SPANs forget, or would like to forget, that there are people out there quite a bit different from themselves. Some are using lightweight browsers that do not understand CSS. Some are using Braille or audio browsers. Web pages need to make sense without their style sheets.So it's okay not to use them then.
( Snce NONE of the sites I work on would make any sense at all without the style sheet.)Originally posted by SuzanneB
NONE of the sites I work on would make any sense at all without the style sheet.And that's certainly not something to take pride in. Read Charles' post again and consider fixing your mistakes.SuzanneB, u want your site to be able to be read even if the css was not there. Sure it will look very plain but it will still be able to be read and understood. You will want to take a look into this w/ your site to see how it looks w/o and the css.As Charles said, in not so many words that page formatting can be crucial. You need to consider the minus stylesheet view. To organise a page in all situations regardless of browsers and stlyes is the best way to creating a web page.
Just because you have formatted the divs to break content into the relevant paragraphs and forms doesn't mean theres not point refining the x/html.
Of course you can format P tags and span tags!
Best Wishes,
Davidi recommend (for this issue) Download ing opera. it has a feature called "author view" which disables the stylesheet.Use semantic markup where ever possible. What does that mean? It means that even though you could just use a <div> tag for everything, you shouldn't.
You need to build up a basic page structure with your XHTML, that means breaking the page up into paragraphs and lists etc. Take a look at quiterude.com (<!-- m --><a class="postlink" href="http://www.quiterude.com/">http://www.quiterude.com/</a><!-- m -->). There are only four <div> tags on the index page, that's because I have tried to cut out as much uneccesary markup as possible.
Also check out RJSystems (<!-- m --><a class="postlink" href="http://www.fsg-uk.com/rjsystems/">http://www.fsg-uk.com/rjsystems/</a><!-- m -->), There are only four <div> tags on any one page, and they are only there to aid with the construction of the layout.
Basically, when you find yourself using a meaningless tag like a <div> or a <span>, just think, is there a better, more suitable tag that you could be using.
In some respects, a totally <div> layout is worse that a totally <table> layout.Originally posted by rhsunderground
i recommend (for this issue) Download ing opera. it has a feature called "author view" which disables the stylesheet.
Firefox has a Web Developer Toolbar (<!-- m --><a class="postlink" href="http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63">http://update.mozilla.org/extensions/mo ... =60&vid=63</a><!-- m -->) extension, which you can use to disable cookies, JavaScript, Java, CSS, images, page colors, referrer logging, and image animations within two clicks or with keystrokes. Originally posted by Jona
Firefox has a Web Developer Toolbar (<!-- m --><a class="postlink" href="http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63">http://update.mozilla.org/extensions/mo ... =60&vid=63</a><!-- m -->) extension, which you can use to disable cookies, JavaScript, Java, CSS, images, page colors, referrer logging, and image animations within two clicks or with keystrokes.
awesome, thx i could definitely use that thx jonaDoes anyone know if that web dev toolbar works with firefox 0.9 as didnt all of the plugins and skins stop working.Works perfectly for me.Originally posted by SuzanneB
To P or not to P <snip/>
... when you gotta go, you gotta go ... Originally posted by SuzanneB
On the process of formatting, I was reading a book in which it stated that one of the great reasons for CSS was to get rid of tags like <p> and allow full control over formatting.
I'm betting this is not true. I think it's more likely that it said the idea was to remove the need for <font> tags and ya just got it mixed up in yer memory. Either ya just got it muddled in yer memory or the article ya read is totally wrong.
One of the many purposes behind CSS is to remove the need for presentational markup (such as <font>) and re-enforce the use of semantic and structural markup (such as <p>).
A <div>s should most certainly vever be used to replace <p>s. I find one of the beauties of using semantic mark up is that even without the slightest whiff of css being implemented into a page, it's already got half of its layout built for ya. All you have to do after that is just link in yer css to make yer already well defined elements their desired shape (which in many cases will eliminate anlmost any need for positioning any way because everything will likely fall nicely into place after that) and then make it look how ya want.
I find thinking about positioning less actually helps to position things better anyway. You should try it. Just mark up your page semantically without even making any css at all. Then after that, give the elements the size and shape they want. THEN after you have done these first two steps, IF anything still needs to be positioned (which a few things probably will, but not nearly as much as you might think.) then try floating yer elements into place. If things still aren't stiing right after that (which I find is rarely the case), then use position:relative; or position:absolute;.
Positioning used to drive me crazy when I started out with css simply because I was thinking about it too much and trying to position everything whilst I was creating the mark up. I've also seen quite a few pages where loads of elements are given an absolute position, when no positioning was actually needed at all. CSS is your friend, there to make you life much more simple and easy. Don't try and wrestle your elements into position and your elements, CSS and yourself will all get along that much better. Originally posted by Vladdy
... when you gotta go, you gotta go ...
Ah, the comedian helper, not pleaser...
Originally posted by Sharkey
Does anyone know if that web dev toolbar works with firefox 0.9 as didnt all of the plugins and skins stop working.
Should work with every version from Firebird 0.7 and up...WebDevExtSvdMyLfeI was reading a book in which it stated that one of the great reasons for CSS was to get rid of tags like <p> and allow full control over formatting. In the subsequent example, all the formatting was achieved using styles applied to div's. No p tags were used at all.
Time to throw a book away, Suzanne. A paragraph is a paragraph. There is no structural alternative. A book that has something like that in it cannot be trusted for any of its other content. Maybe you should hit Zeldman's site and pick up the new Castro book he's recommending.Well since you don't seem to be a complete beginner, I'd recommend a different Castro book, Elizabeth Castro's HTML for the Worlld Wide Web with XHTML and CSS.
I learned HTML wrong the first time around (you wouldn't believe the tables ) and that book re-taught it me the correct way.Glad to hear she has another good one.
I am curious about this though, because no web site I have seen exclusively uses the div instead of the p? Do people just use the p because they are used to it? Or because it is convenient? Or is it just it is available - so it is handy to use it?Words, words, words - if you have a bunch of words strung together into sentences. And those sentences strung together into paragraphs then you need those paragraphs marked with P elements. In the same way headings need to be marked with the H elements.
Those people who suggest just DIVs and SPANs forget, or would like to forget, that there are people out there quite a bit different from themselves. Some are using lightweight browsers that do not understand CSS. Some are using Braille or audio browsers. Web pages need to make sense without their style sheets.So it's okay not to use them then.
( Snce NONE of the sites I work on would make any sense at all without the style sheet.)Originally posted by SuzanneB
NONE of the sites I work on would make any sense at all without the style sheet.And that's certainly not something to take pride in. Read Charles' post again and consider fixing your mistakes.SuzanneB, u want your site to be able to be read even if the css was not there. Sure it will look very plain but it will still be able to be read and understood. You will want to take a look into this w/ your site to see how it looks w/o and the css.As Charles said, in not so many words that page formatting can be crucial. You need to consider the minus stylesheet view. To organise a page in all situations regardless of browsers and stlyes is the best way to creating a web page.
Just because you have formatted the divs to break content into the relevant paragraphs and forms doesn't mean theres not point refining the x/html.
Of course you can format P tags and span tags!
Best Wishes,
Davidi recommend (for this issue) Download ing opera. it has a feature called "author view" which disables the stylesheet.Use semantic markup where ever possible. What does that mean? It means that even though you could just use a <div> tag for everything, you shouldn't.
You need to build up a basic page structure with your XHTML, that means breaking the page up into paragraphs and lists etc. Take a look at quiterude.com (<!-- m --><a class="postlink" href="http://www.quiterude.com/">http://www.quiterude.com/</a><!-- m -->). There are only four <div> tags on the index page, that's because I have tried to cut out as much uneccesary markup as possible.
Also check out RJSystems (<!-- m --><a class="postlink" href="http://www.fsg-uk.com/rjsystems/">http://www.fsg-uk.com/rjsystems/</a><!-- m -->), There are only four <div> tags on any one page, and they are only there to aid with the construction of the layout.
Basically, when you find yourself using a meaningless tag like a <div> or a <span>, just think, is there a better, more suitable tag that you could be using.
In some respects, a totally <div> layout is worse that a totally <table> layout.Originally posted by rhsunderground
i recommend (for this issue) Download ing opera. it has a feature called "author view" which disables the stylesheet.
Firefox has a Web Developer Toolbar (<!-- m --><a class="postlink" href="http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63">http://update.mozilla.org/extensions/mo ... =60&vid=63</a><!-- m -->) extension, which you can use to disable cookies, JavaScript, Java, CSS, images, page colors, referrer logging, and image animations within two clicks or with keystrokes. Originally posted by Jona
Firefox has a Web Developer Toolbar (<!-- m --><a class="postlink" href="http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63">http://update.mozilla.org/extensions/mo ... =60&vid=63</a><!-- m -->) extension, which you can use to disable cookies, JavaScript, Java, CSS, images, page colors, referrer logging, and image animations within two clicks or with keystrokes.
awesome, thx i could definitely use that thx jonaDoes anyone know if that web dev toolbar works with firefox 0.9 as didnt all of the plugins and skins stop working.Works perfectly for me.Originally posted by SuzanneB
To P or not to P <snip/>
... when you gotta go, you gotta go ... Originally posted by SuzanneB
On the process of formatting, I was reading a book in which it stated that one of the great reasons for CSS was to get rid of tags like <p> and allow full control over formatting.
I'm betting this is not true. I think it's more likely that it said the idea was to remove the need for <font> tags and ya just got it mixed up in yer memory. Either ya just got it muddled in yer memory or the article ya read is totally wrong.
One of the many purposes behind CSS is to remove the need for presentational markup (such as <font>) and re-enforce the use of semantic and structural markup (such as <p>).
A <div>s should most certainly vever be used to replace <p>s. I find one of the beauties of using semantic mark up is that even without the slightest whiff of css being implemented into a page, it's already got half of its layout built for ya. All you have to do after that is just link in yer css to make yer already well defined elements their desired shape (which in many cases will eliminate anlmost any need for positioning any way because everything will likely fall nicely into place after that) and then make it look how ya want.
I find thinking about positioning less actually helps to position things better anyway. You should try it. Just mark up your page semantically without even making any css at all. Then after that, give the elements the size and shape they want. THEN after you have done these first two steps, IF anything still needs to be positioned (which a few things probably will, but not nearly as much as you might think.) then try floating yer elements into place. If things still aren't stiing right after that (which I find is rarely the case), then use position:relative; or position:absolute;.
Positioning used to drive me crazy when I started out with css simply because I was thinking about it too much and trying to position everything whilst I was creating the mark up. I've also seen quite a few pages where loads of elements are given an absolute position, when no positioning was actually needed at all. CSS is your friend, there to make you life much more simple and easy. Don't try and wrestle your elements into position and your elements, CSS and yourself will all get along that much better. Originally posted by Vladdy
... when you gotta go, you gotta go ...
Ah, the comedian helper, not pleaser...
Originally posted by Sharkey
Does anyone know if that web dev toolbar works with firefox 0.9 as didnt all of the plugins and skins stop working.
Should work with every version from Firebird 0.7 and up...WebDevExtSvdMyLfeI was reading a book in which it stated that one of the great reasons for CSS was to get rid of tags like <p> and allow full control over formatting. In the subsequent example, all the formatting was achieved using styles applied to div's. No p tags were used at all.
Time to throw a book away, Suzanne. A paragraph is a paragraph. There is no structural alternative. A book that has something like that in it cannot be trusted for any of its other content. Maybe you should hit Zeldman's site and pick up the new Castro book he's recommending.Well since you don't seem to be a complete beginner, I'd recommend a different Castro book, Elizabeth Castro's HTML for the Worlld Wide Web with XHTML and CSS.
I learned HTML wrong the first time around (you wouldn't believe the tables ) and that book re-taught it me the correct way.Glad to hear she has another good one.