• 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.

  • CF has always been a site that welcomes people from different backgrounds and beliefs to participate in discussion and even debate. That is the nature of its ministry. In view of recent events emotions are running very high. We need to remind people of some basic principles in debating on this site. We need to be civil when we express differences in opinion. No personal attacks. Avoid you, your statements. Don't characterize an entire political party with comparisons to Fascism or Communism or other extreme movements that committed atrocities. CF is not the place for broad brush or blanket statements about groups and political parties. Put the broad brushes and blankets away when you come to CF, better yet, put them in the incinerator. Debate had no place for them. We need to remember that people that commit acts of violence represent themselves or a small extreme faction.

How to Avoid Drowning in Ocean of HTML Codes

Tom D

Loyal member
Nov 25, 2024
416
198
NSW
✟73,332.00
Country
Australia
Gender
Male
Faith
Catholic
Marital Status
Private
HTML can get messy, and become very hard to read.

Especially when it's mixed with JavaScript and PHP (database driven web app)

it's like a thousand knitting threads totally tangled together.
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,531
8,669
Canada
✟922,715.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
23,081
20,091
Flyoverland
✟1,401,759.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.
 
  • Informative
Reactions: Tom D
Upvote 0

Tuur

Well-Known Member
Oct 12, 2022
3,003
1,621
Southeast
✟100,109.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
3,003
1,621
Southeast
✟100,109.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,831
5,621
European Union
✟236,339.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:
  • Like
Reactions: Tom D
Upvote 0

Tom D

Loyal member
Nov 25, 2024
416
198
NSW
✟73,332.00
Country
Australia
Gender
Male
Faith
Catholic
Marital Status
Private
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.
I tried a web version of 'Tidy', it's not very helpful. I could do the tidying myself.

What we need is to modularize the code as much as possible.
 
Upvote 0