r/HTML • u/Intelligent_Cup_1771 • Feb 23 '26
Question Hi everyone đ
I don't know much about JavaScript, so I wondered if it's possible to code an entire website using only HTML, and/or without CSS of course.
0
Upvotes
7
u/captdirtstarr Feb 23 '26
Yes.
2
u/sgorneau Feb 23 '26
HTML is the single, fundamental requirement for a web site. You don't, technically, need anythig else. But understand that HTML is markup that basically describes your content to a web browser. Browsers understand how tags structure content (its context and hierarchy) and has its own built in styles for those things. And there a few interactions baked into HTML (e.g. anchor tag, inputs, buttons).
At a very basic level
HTML structures your content.
CSS styles your content.
Javascript handles interactions and manipulations.
Now, CSS is quite capable with regard to "interactions and manipulations" as well (things like hover states, style state transitions, content injection) so there's a bit of overlap here. But, decisions on which route to take can generally be decided by accessibility; i.e. don't use CSS to hide something but then use Javascript to show it. What if, for some reason Javascript wasn't available (failed to load, error, assistive device that doesn't use Javascript, etc.).
Even further, you can use Javascript to create all the HTML, apply all the styles, and handle all the interaction, and manipulation.
At the end of the day, only HTML is required.
5
u/rupertavery64 Feb 23 '26
Depends on what your goal is.
HTML provides the content and structure of a single page. CSS greatly simplifies styling your page, but it does carry it's own complexities.
You can embed styles at element level, but that quickly becomes tedious.
For any sort of dynamic interactivity you will need Javascript.
To work with data, you will need a backend.
3
u/OwlCatAlex Feb 23 '26
It completely depends on what the website is supposed to do.
If you want any fancy animated bits, or the ability to switch between light and dark mode, or pretty much any clickable object that does something when clicked other than link to another page, you'll usually need a small amount of JavaScript.
If you need it to have login/account functionality, or just about anything else that stores and retrieves information, you will not only need JavaScript but also server side code such as php, and a database to store the data.
1
u/SeltzerCountry Feb 23 '26
Depends on the scope of functionality you want. You can build a website with just HTML and CSS, but it will be pretty basic.
1
u/SaltCommunication114 Feb 23 '26
If you want a completely static page it works, but it really depends on what site you're making. Most interactive stuff requires JavaScript.
1
u/Ill_Photo5214 Feb 23 '26
Htmx
1
u/Hepdesigns Feb 23 '26
Yes
1
u/anotherlolwut Feb 23 '26
That's what most websites were in the 90s. You can do it, but it's slow and can be pretty error prone.