Ok, I need a new thread for my HTML processing program

In summary, the conversation discussed the need for a clear plan and structure when writing CSS. The speaker mentioned creating an outline and adding to it as they encounter problems. They also received feedback on the structure of their CSS file, with the suggestion to use classes that only depend on one or two levels of HTML context. This is compared to the "naive" way of applying styles directly to each element, similar to formatting a word document. The speaker emphasized the importance of using CSS correctly, similar to tagging paragraphs and styling those tags instead of individual chunks of text.
  • #1
Jamin2112
986
12
My old thread was getting messy and I realized I needed to go back to square 1 and write up a plan. So here's an outline of the plan:
23m5t04.jpg


2t5r7.jpg


I will add to this thread as I write the helper functions and encounter any problems. Criticism greatly appreciated.
 
Technology news on Phys.org
  • #2
And here's my self-explanatory procedure for writing the formatted CSS into a string:

2uq2mo1.jpg
 
  • #3
Im not really sure if this is relevant for you or not, but in general you would probably not want to structure a CSS file like you do above. If you do, then it is similar to inserting style="" attributes on each elements (this is similar to the naive way of formatting a word document by applying style directly to each chunk of text).

CSS usually shines best when your style classes only depends on one or two levels of html structure context above the current element, although sometimes more is required when you need to adjust a specific frameworks use of CSS in one particular situation. Using CSS the "right way" is similar to formatting a word document by tagging paragraphs as body text, headlines, etc. and they style those tags instead.
 

Related to Ok, I need a new thread for my HTML processing program

1. What is an HTML processing program?

An HTML processing program is a software application that allows you to manipulate, parse, and render HTML code. It is commonly used by web developers to create and edit websites.

2. Why do I need a new thread for my HTML processing program?

Threads in a programming context refer to separate processes that can run concurrently. By creating a new thread, you can divide the workload of your HTML processing program and improve its performance.

3. How do I create a new thread for my HTML processing program?

The exact process of creating a new thread will depend on the programming language and framework you are using. However, in general, you can use threading libraries or built-in functions to create and manage threads in your program.

4. Can a single thread handle all the tasks in my HTML processing program?

Yes, a single thread can handle all the tasks in your HTML processing program. However, using multiple threads can help improve the speed and efficiency of your program, especially when dealing with large amounts of HTML code.

5. Are there any potential challenges when using multiple threads in an HTML processing program?

Yes, there are potential challenges when using multiple threads in an HTML processing program, such as race conditions, deadlocks, and thread synchronization issues. It is important to carefully design and test your program to avoid these challenges.

Similar threads

  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
22
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
20
Views
3K
Replies
6
Views
1K
Replies
22
Views
2K
  • Programming and Computer Science
Replies
29
Views
6K
Replies
4
Views
849
  • Programming and Computer Science
3
Replies
75
Views
4K
Back
Top