Laravel-From-Scratch-HTML-CSS icon indicating copy to clipboard operation
Laravel-From-Scratch-HTML-CSS copied to clipboard

Poor quality code!

Open MasihTak opened this issue 1 year ago • 1 comments

I've found numerous bugs in your code that I'm going to address:

Therefore, it is better to use semantic elements for the different parts of the site, and use section tags only when there is no more specific element to represent a section of the document. This will improve the readability, accessibility, and SEO of the code.

Navigation

Select

Search bar

  • You should use the type="search" attribute for the input element, instead of type="text". This will indicate that the input is intended for search terms, and allow the browser to apply different styling or functionality to it.
  • You should also add a label element for the input element, and associate it with the id attribute of the input. This will provide a text description for the input, and improve the accessibility and usability of the form
  • You should also add a value attribute for the input element, which will contain the default text that is displayed in the input.
  • You should also add a required attribute for the input element, which will indicate that the user must enter a valid email address before submitting the form.

Email Input

Inline CSS

  • Increase the size and complexity of the HTML document, making it harder to read and maintain.
  • Create redundancy and inconsistency, as the same styles have to be repeated for multiple elements or pages.
  • Reduce the separation of concerns, as the presentation layer is mixed with the content layer.
  • Reduce the reusability and modularity of the code, as the styles are not easily shared or reused across different elements or pages.
  • Reduce the performance and accessibility of the web page, as the browser has to parse more code and apply more styles.

Another thing to avoid is utilizing anti-pattern libraries such as Tailwindcss, which has some downsides that make it a bad web development strategy. Here are a few examples:

  • It violates the principle of separation of concerns, which is the main goal of CSS. Tailwindcss embeds style rules into HTML class names, which reduces the readability and maintainability of the code.
  • It adds unnecessary bloat to the HTML file, which can affect the website's speed and performance.
  • It generates a large amount of CSS code that may not be needed or used by the web page, increasing the loading time and bandwidth usage.
  • It limits your creativity, which means it constrains your ability to design unique and custom websites.

Last but not least, the form elements raise a number of accessibility concerns, which I have already covered here!

MasihTak avatar Dec 06 '23 12:12 MasihTak

Want to work on this ..

amiii123malviya avatar Jul 15 '24 06:07 amiii123malviya