• Starting today August 7th, 2024, in order to post in the Married Couples, Courting Couples, or Singles forums, you will not be allowed to post if you have your Marital status designated as private. Announcements will be made in the respective forums as well but please note that if yours is currently listed as Private, you will need to submit a ticket in the Support Area to have yours changed.

How to Avoid Drowning in Ocean of HTML Codes

Learning always

Active Member
Nov 25, 2024
154
86
nsw
✟56,821.00
Country
Australia
Gender
Male
Faith
Catholic
Marital Status
Private
HTML can get messy, and become very hard to read. it's like a thousand knitting threads totally tangled, or like
drowning in an ocean of HTML codes.
When you are writing a complex Html page, how do you handle it ??
 
Last edited:

Gregory Thompson

Change is inevitable, feel free to spare some.
Site Supporter
Dec 20, 2009
30,058
8,455
Canada
✟872,897.00
Country
Canada
Faith
Christian Seeker
Marital Status
Married
HTML can get messy, and become very hard to read.
When you are writing a complex Html page, how do you avoiding drowning in an ocean of HTML codes ??
It has been a while, but there's a code that is used to make comments that can only be seen by the coder or under view source in the browser.

These comments are supposed to act as headers and bookmarks so the coder can identify that this section of code does "this"
 
Upvote 0

chevyontheriver

Well-Known Member
Site Supporter
Sep 29, 2015
22,545
19,566
Flyoverland
✟1,318,173.00
Country
United States
Gender
Male
Faith
Catholic
Marital Status
Married
Politics
US-American-Solidarity
HTML can get messy, and become very hard to read.
When you are writing a complex Html page, how do you avoiding drowning in an ocean of HTML codes ??
The worst HTML code is put together by ‘helpful HTML creation apps’ and it is pretty much unreadable. There was a useful little program available on Linux computers called ‘tidy’ that could clean up a lot of mess.

Oh, and comments in the code are always your friend. As was already pointed out.
 
Upvote 0

Tuur

Well-Known Member
Oct 12, 2022
2,315
1,247
Southeast
✟81,795.00
Country
United States
Gender
Male
Faith
Christian
Marital Status
Married
HTML can get messy, and become very hard to read. it's like a thousand knitting threads totally tangled, or like
drowning in an ocean of HTML codes.
When you are writing a complex Html page, how do you handle it ??
Like Gregory Thompson said, it's been a while. I used to start simple, then get more elaborate. I've used Bluefish (tm) as an editor and Arachnaphilia (tm), the latter to validate code. Think I used another code validator, but would have to look through my files. I'm not sure because after I got the general web page formatted like I wanted, I used it as a boilerplate for the rest and for maintenance.

I used plenty of comments telling what which section did, like "This is the menu." Or "Such and such goes here." For the style sheets, that came in real handy. If you ever have to go back in to maintain it, comments help a great deal.
 
Upvote 0

Tuur

Well-Known Member
Oct 12, 2022
2,315
1,247
Southeast
✟81,795.00
Country
United States
Gender
Male
Faith
Christian
Marital Status
Married
The worst HTML code is put together by ‘helpful HTML creation apps’ and it is pretty much unreadable. There was a useful little program available on Linux computers called ‘tidy’ that could clean up a lot of mess.

Oh, and comments in the code are always your friend. As was already pointed out.
What to have some fun? Take a word processor document, export to HTML, and take a peek at it.
 
Upvote 0

trophy33

Well-Known Member
Nov 18, 2018
13,462
5,441
European Union
✟223,052.00
Country
Czech Republic
Gender
Male
Faith
Christian
Marital Status
Single
HTML can get messy, and become very hard to read. it's like a thousand knitting threads totally tangled, or like
drowning in an ocean of HTML codes.
When you are writing a complex Html page, how do you handle it ??
Do not write one complex html page, write an online app composed of many simple html pages and integrate them into one during the build time (you can use for example Webpack for building).

And instead of creating and styling every button, table, form etc. by yourself, use some UI library (for example Material UI) and potentially also some JS framework, for example React, Angular or Vue.

Your project structure should correspond to your website structure so that you can orient in your code intuitively and easily. Small files in well-named directories. There are even some standards of how to structure projects build in specific frameworks.

Using a more advanced IDE may help you with things like bulk refactors or AI integration. You can use many advanced IDEs for free, like for example Pulsar Edit or VS Code.
 
Last edited:
Upvote 0