<p> vs <span>

It’s not about SEO, it’s about completely abusing what HTML is for in the first place, as well as being completely inaccessible and therefore probably breaking the law in a few countries where this applies. The whole point of HTML is to mark up a document as distinct elements and sections, not just to provide styling hooks for your css. A <p> is definitely NOT the same as <div> without default styles, <p> has semantic meaning as a paragraph, <div> has no semantic meaning.

Then you are quite wrong, I’m afraid. I suggest reading the HTML 4.01 specification to learn what the various element types mean and how they should be used.

Stormrider refuted this preposterous statement so well :tup: that I’ll leave it at that.

The point in that is to separate content/semantics from presentation.

I won’t call you crazy, but I’ll say that you seem to be badly misinformed.

In my eyes it does – depending on how you define ‘normal writing’, of course. :slight_smile:

Actually, I’ve wondered about that myself and am not sure that that is not a paragraph, especially since most copyright notices are longer than that. Paragraphs can be only one line long.

And, yes, you should definitely not use a P tag to just create blank space. Don’t even use a DIV tag or a BR tag just to create blank space.

Wow, that’s completely messed up. You think you are being a CSS purist but you are getting everything completely wrong. Yours is what I would call a variant case of DIVitis. Using a P element (assuming you do so properly by wrapping a paragraph of text with it) in your HTML is most assuredly NOT the same as giving it style. It IS, however, giving it structure. Learn the difference.

Yes, call me a purist or DIVitis~ I will not change because I believe in my philosophy! hahaha. Still, I do understand your point and I would be w/ you if it was 2 yrs ago. But, one day I would not be surprise if HTML 7/8/9/100 will take out all styling tags. Yes, please continue to trash my philosophy but I’m quite proud of my work I do. It could be that my way of doing thins are WRONG but I’m not the kind of person who is afraid of doing things in different approach to find better way of accomplishing a task~ Yes, bash me~~ I will continue to find better ways~~ If I’m wrong, I’ll learn my mistake in my own ways. Certainly, I won’t just follow the book like 10th commendment.

Correct:
http://www.w3.org/MarkUp/html3/address.html

<cite> is also commonly used to indicate ownership and authorship of a web page.

Of course a block level element would be encapsulating this inline element.

In my philosophy Structure and Style does not exist in HTML. This can be done in CSS. For example


<div id="footer">
copy right blah blash
</div>

I can display this block on any position along w/ styles.

Well structure within the content does count though!! I can’t help that.

sg707, it is true that some things are a matter of opinion. This is not one of them. I am trying to help you understand that the things you think are “styling tags” are NOT styling tags and I honestly don’t know how you got that idea because nobody that knows what they are talking about gave you that idea. Just sit there and think about this for a while, maybe read a few good books and articles on the subject. It might take you a few minutes or it might take a month or a year. If you don’t catch what I am saying after a certain period of time let me know and I will clarify it to you further. This is not about you finding a better way. It’s about helping you understand the truth of certain things. Wrapping an opening and closing P tag around a paragraph is NOT styling it. It IS structuring it and denoting it as a “paragraph” in the document. Styling on said paragraph does not occur unless and until CSS rules are applied to it. Please get the clarification.

What you are doing is like looking at your car and telling everyone it’s a plane. Somebody can try to tell you it’s a car and you have the freedom to insist it’s a plane but your insistence won’t change the simple facts.

http://www.w3.org/TR/REC-html40/struct/global.html#edef-DIV

Interesting:
http://www.flexewebs.com/semantix/semantic-uses-of-div-html-tag/

From the Wikipedia entry:

In HTML (including XHTML), the span and div elements are used where parts of a document cannot be semantically described by other HTML elements.

That means if an HTML element exists that does describe a part of your document you are supposed to use that element and not resort to using the generic DIV.

Yep :slight_smile: Pretty common knowledge, i’d hope hah!

Thanks for the advice but being a in this field for 10 years, I’m sure I know a thing or two about web technology. I really do understand your point and have been practicing that way for years~~~ then I realize few things and theorize how I can build better quality code. I also had a chat w/ many over qualify people through conferences and they tend to agree w/ my approach. Or perhaps they were just being nice to me :D.

I do appreciate that you’re trying to help me understand but I still believe <p> is a styling tag. It gives style over your content and not the structure. p tag gives margin and padding around the content. How is that not styling? In fact that many browser treat <p> tag differently. They do look very similar but exact padding/margin is different. To make it more legit, here is Yahoo Base CSS

http://yui.yahooapis.com/2.7.0/build/base/base.css

I do use this. They were kind enough to find all tags that may look on different browser and gave it a style to make sure ALL browser will look EXACTLY same. Inside there, you’ll see “p”. If “p” was a structure tag then why would they override it? I’m not saying you’re wrong, I’m right or I’m wrong, you’re right. I’m just saying this is another approach of making web application. Still, good stimulating conversation!

I start my html document with just the semantic html for the simple reason that I want to know it will be structured and meaningful without any CSS. Getting in this habit means that I am now thinking more carefully up front about the structure of the website and of each page.

Also @sg707, doing something for 10 years does not automatically mean you are doing it in the best possible way. I’m all for eschewing popular opinion when I’ve got the conviction of my belief, but in this particular case I personally think what you are doing is, as someone already pointed out, creating inaccessible content.

Man…my eyes are bleading… You mean to say that using semantic HTML that gives all styles in HTML file is better than HTML + CSS? I can’t continue any further if conversation goes on this direction. I’m just going to say “WE SHALL SEE WHO IS RIGHT IN NEXT 10 YEARS!” If I was making inaccessible web application, I wouldn’t have job today. I’m sure it’s accessible.

<p> is NOT a styling tag. It is a tag with semantic meaning that browsers happen to give a default styling to so that if no stylesheet is defined, the document is a bit easier on the eye.

There is a HUGE difference between a ‘styling tag’ (such as <font> or <center>) and a tag that a browser assigns some default styles to (such as <p>, <li>…). You might think you know it all having been in the industry for 10 years, but this just tells me you’ve made no effort to learn about the industry at all or your own profession.

Your sites are NOT accessible (screen readers can make use of the semantic information in HTML tags, it can’t do anything with a wall of text except read it from start to end), NOT SEO optimised (although you’ve already said you don’t care about that).

We will indeed see who is right in 10 years. About that time, I reckon HTML 5 might be about as popular/in widespread use as HTML 4.01 is at the moment. Notice that HTML 5 doesn’t remove all tags except <div>, like you suggest will happen.

This is NOT another approach to making web applications, it is just plain wrong, as laid down in the HTML standards (HTML? Remember - that language you are using and ignoring the specs of? What is the use in that?)

the kitchen of a house could be treated as a room with stove, freezer and tables but why its name is not “room with stove freezers and tables”? because there is a structural diference, kitchen needs configurations (pipes, connection to sewerage…) that a simple room don’t need.

The same is to the <div> and <p> tags, the div is a simple block-level divisor of content, while the p is a pre-configurated structural paragraph.

There are only two styling tags in HTML - <style type=“css”> and <link rel="stylesheet type=“text/css”>. All other tags have no connection to styling at all and are there to semantically identify what the tag contains. Using a <p>tag identifies that what is contained is considered by the author to be a paragraph. How paragraphs should look depends on the stylesheet settings supplied by the page author and the person visiting the page.with the visitor’s choices taking precedence. If your visitor thinks all paragraphs should fe 26px Comic Sans in irridescent green then that’s how your paragraphs will display in their browser. If you use the wrong tag to mark something up then it may end up looking completely different from how it is supposed to in their browser.

Viewing your page in a text only browser or better using a web reader will help you to understand better what HTML is for and what it isn’t for.

HTML 4 already did that. No need to wait for hypothetical future versions for something that has already been done.

Yeah, you’re still a good, nice guy and we’re all friends here and everything but the simple fact of the matter is that you’re still understanding this wrong. You must be the person who coined the phrase “styling tag” because I have never heard it used before. A paragraph in a document will have minimal styling applied to it not because it’s a “styling tag” (because it isn’t) but because browsers tend to come with default style sheets. The fact that this styling tends to occur almost automatically does not make a P tag a “styling tag.” You need to catch the nuances of what’s going on here. It is CSS and not HTML that is adding “styling” even when it’s a default browser style sheet that adds styling right away.

Nobody here is saying that. Let me repeat: Nobody here is saying that. I too tend to use Yahoo’s reset style sheet to neutralize browser differences and the base style sheet to apply a sensible base of styles back to all screen browsers. What we are saying is that if an HTML element exists that describes the content you are including it then you should use that rather than the generic DIV element. Once you do that you can also then apply styling with CSS. Or you can live with a browser’s default styling. Or you can do away with a browser’s default styling. I think your problem is that you’re not grasping that initial styles on a web page come from the default style sheet, but you’ve replaced it in your mind with this idea that initial styles come solely from HTML.

span and div are both emtpy containers: span for inline and div for block

So your first sentence is correct.