Question

If yes then presentational elements would be helpful in this condition so should we use those?

<b>…</b> , <i>…</i>, <big>…</big>, <small>…</small>, <tt>…</tt>, <hr />

These are valid tags

Was it helpful?

Solution

The page should be marked up semantically, not for its presentation. If you put proper semantic markup on elements, the browser will usually apply a basic style to them by itself. You should not be concerned with how the document looks unstyled. If it's unstyled, it has no style. CSS is responsible for the style. If a user chooses to view the document without style, let it be so.

OTHER TIPS

Generally a ("normal") user cannot disable CSS as easy as JavaScript. So I would answer NO.

CSS is a part of the presentation and when the CSS is not available we should think that the presentation is not available. Thus the client side is broken.

You should not be concerned about that as you don't want to debug a client abusing the presentation.

BUT, if you need to support non-standard devices (old mobiles maybe) this is a valid concern. Still instead of changing the page to "fit all sizes", you should have a separate page for such devices.


Not sure about tt (I guess you can use). But b, i should be replaced by strong and em respectively.

big and small should not be used IMO and be replaced by alternative tags depending on the semantics.

Technically, you could pretty much create an entire page using <div> and <span> tags. That would just be messy though, and not very intuitive. Personally, I find that the tags you list make it easier for a human to parse what the page is attempting to communicate, while also offering the benefit of making a page readable when the CSS doesn't load.

It sounds like you're asking if you should use tags like <small> so that, in the absence of CSS, what you want to be small will be small.

No.

The reason to consider how the page will look without CSS is to know if you are using good semantic layout. If it's usable, your HTML, which is only designed with semantic organization in mind, is okay. That's it. If your users, for whatever reason, don't want to support presentational things like CSS, don't use presentational tags.

And, really. If your users don't have CSS for whatever reason, they don't deserve to see something as bold. It's more work for you, it's not semantic, and no one will ever care.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top