开发者

What is negative point on using W3C presentational xhtml tag?

If some xhtml tag are presentational but valid in W3C then if i use then what is negative point of using those Tags in terms of semantic, code ma开发者_JAVA百科intanance. I'm talking about b, big, br, hr, i, and small.Are all presentational tags deprecated?


In short: There is no real negative point to using those tags.

To answer more fully: The presentation elements you listed are all indeed valid in XHTML and NOT depreciated: big, i, small, sub, tt and hr.

The only downside to using them is your own site's maintainability: It is easier to maintain/change a website when all the presentational elements are stored away from formatting in CSS.

So, apart from the possibility of more work for you (and anyone else who works on the website), there aren't any real negative points.

Please note: br is NOT presentational, it is considered formatting, like p and h1.


Phrase elements like <strong> and <em> are more semantically correct and are able to achieve richer effect through CSS (rather than simply bold or italic).

These elements also takes standard attributes and event attributes.

And yes, elements: b, big, br, hr, i, and small are deprecating and not supported in HTML5.

Edit: Thanks @Alohci for correction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜