1

Just wondering is it possible to use HTML alone to create a div columns without the use of any CSS?

It would make things easy for me with less code etc. Thanks for any suggestions or examples.

Corentin Pane
  • 4,794
  • 1
  • 12
  • 29
Yummi
  • 117
  • 1
  • 1
  • 8
  • 2
    You will need CSS for anything that changes how the page looks, that is what it's for. HTML is only for markup (raw content), CSS is for styling/layout, and JavaScript is for interactivity. While you could use HTML hacks like tables for similar effects it's not advisable. – Oliver Sep 27 '20 at 10:34
  • It's funny I came up with you question I'm building a static website without CSS or any type of style. It's challenging which is the fun part but there's little to nothing out here that can guide me, nevertheless getting down votes when I'm asking for help too! If I find something I'll share it thru here, GL! – Vlad Ezikon Oct 03 '20 at 06:58

1 Answers1

3

A dirty hack would be to use a table. This has a number of limitations compared to CSS, the notable ones being:

  • Bad semantics (and thus a poor experience for screen readers and search engines)
  • No automatic flowing of content from one column to the next
  • Significantly more code

It gives none of the benefits over CSS that you say you are looking for.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • OK but ignore the semantics I found myself in the same situation, it's logical that it's more work but it's a great exercise as a newbie it's frustrating to ask a question an get knocked down by the pros. I find myself too not using CSS or any Style tag for a static website just pure raw HTML, it would be of great help to get some answers like LEGIT ANSWERS not "you're doing it wrong" . Thank you! EDIT: English is not my first language so ignore the grammar, sorry about that – Vlad Ezikon Oct 03 '20 at 06:55
  • @VladEzikon : As I said, you can use a table. Doing so is a terrible idea. It **won’t** give the specific results the question is seeking. If you were to do that then you would, literally, be *doing it wrong*. It is **not** a good exercise for a newbie. Newbies should focus on doing things the right way, not dealing with esoteric hacks that are worse in every possible way. If you find yourself not using CSS for a static website then start using CSS for it. – Quentin Oct 03 '20 at 10:35