What are the reasons behind the continued use of tables, inline css, and other outdated web design practices

It seems that the current mantra for learning HTML is "Clean code = better code".

I can't help but wonder why popular sites like Mobile Me, Google, and Facebook still rely heavily on tables and other not-so-semantic coding practices.

Any insights would be greatly appreciated. Thank you!

Answer №1

Regrettably, there are still individuals who insist on using IE6, despite its glaring inadequacies when it comes to CSS compatibility. This outdated browser severely limits the effectiveness of CSS selectors, making it difficult to implement advanced styling techniques. Until IE6 fades into obscurity and becomes a distant memory, we will continue to encounter these challenges.

The abomination that SharePoint generates would likely induce severe shock if you were able to witness it firsthand.

Answer №2

While clean code is important, functional code is ultimately more valuable.

Focus on ensuring your code works efficiently above all else!

Answer №3

There are times when taking the path of least resistance is necessary. It's not always about sticking to your ideals, but rather being practical and accomplishing tasks in the complex, diverse world of multiple browsers and platforms.

Answer №4

Choosing simplicity.

While I typically aim for using semantic tags and external CSS for layout, sometimes practicality wins out. When faced with the need to launch a website quickly (so I can head home to enjoy dinner with my wife), tackling browser compatibility issues with conditional CSS or resorting to tables becomes a tempting shortcut.

For high-traffic sites like Google and Facebook, inline CSS and JavaScript are also favored for their bandwidth-saving benefits. Each external file referenced requires an additional server round-trip for fetching, so minimizing these requests is crucial. Although utilizing style="xxx" over inline <style> tags may seem unconventional, it does help reduce page size. Even with caching in place, optimizing for those initial "clean" cache requests remains important.


  • Not always IE, but often

Answer №5

Recently, I had a client in the world of affiliate marketing who approached me with a request for a web template that he could easily edit using Adobe Dreamweaver. Despite my preference for Linux over Dreamweaver, I took on the challenge and created a clean design using XHTML and cross-platform CSS techniques that I had honed over the years. My approach focused on DIV elements, with only minimal use of TABLES for form field alignment based on the 80/20 principle. The result was a lightweight, fast-loading template compatible across all browsers from IE6 onwards.

However, upon handing over the template to the client, his reaction was unexpected. He expressed frustration with the CSS structure, as he struggled to transfer styling between pages. Instead, he insisted on converting everything to inline styles. Furthermore, he found it difficult to modify the floating DIVs and preferred reverting back to tables, undoing much of my original work. Eventually, we reached a compromise where I retained XHTML + CSS for the overall layout, incorporating PHP "include" for headers and footers, while allowing him control over the central content area through TABLEs and inline styles.

This experience served as a reminder that in some situations, clients may have limited expertise beyond table-based formatting and inline styles, necessitating compromises to align with their preferences and editing capabilities.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilize the JavaScript Email Error Box on different components

On my website, I have implemented a login system using LocalStorage and would like to incorporate an error message feature for incorrect entries. Since I already have assistance for handling email errors on another page, I am interested in applying that sa ...

Using Bootstrap SCSS in ReactJS without applying Bootstrap CSS classes

After successfully installing bootstrap using the following command: npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9bbb6b6adaaadabb8a999edf7e9f7e9f4b8b5a9b1b8f7ef">[email protected]</a> --save my d ...

When you scroll through the page, white blocks suddenly appear

After completing a website, I noticed some white blocks appearing when scrolling. You can view the site here. This issue occurs on both mobile and desktop devices during the initial load only. Could this indicate that the page has not fully loaded yet? If ...

Having difficulty managing the responses of two separate <select> elements with images in jQuery

I recently started using online jQuery to manage images within the "select" element of my HTML code. However, I've encountered a problem where events on each individual "select" element are not being separated correctly. var selectedId = ""; ...

Obtain all text within a <div> element by utilizing the agility html package

When attempting to retrieve all <p> tags from within a <div> using the Agility HTML package, I encountered an issue where only the first <p> tag was obtained. <div id='bodayDiv'> <p> hi </p> <p> what is ...

Here is a guide on updating HTML table values in Node.js using Socket.IO

I successfully set up socket io communication between my Node.js backend and HTML frontend. After starting the Node.js server, I use the following code to emit the data 'dRealValue' to the client side: socket.emit ('last0', dRealValue) ...

Having some trouble integrating CSS with JavaFx; encountering an error

Can anyone help me with using CSS in JavaFx? I'm encountering an error while trying to add a CSS file (style.css) to my fxml file through stylesheets. The error message I'm getting is: com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged W ...

Illustration tucked beneath the menu

I am looking to create a landing page for my project similar to the design on this website. I am using Bootstrap 4 and HTML, but struggling to hide the background image behind the navigation bar. Can anyone help with this issue? ...

Obtain a delete button for removing a record and creating a hyperlink to navigate to a different page

Currently, I have set up an HTML table to display appointment bookings with a delete button in each row to remove individual bookings instantly. However, I am interested in implementing a confirmation message before deletion and redirecting the user to a n ...

Collapsed Bootstrap navigation bar on mobile devices

Hello everyone, I am currently using the latest version of Bootstrap for my website. However, I have encountered an issue where the navigation collapses on mobile view. Could anyone provide assistance? Website: Below is a snippet of my HTML code: <he ...

Sort the elements within the *ngFor loop according to the category upon clicking the button in Angular

Currently, I have a collection of items that I am iterating through using *ngFor. Above this list, there are category buttons available as shown in the HTML snippet below. My goal is to enable filtering of the list based on the category of the button click ...

What causes the flex div to inherit the full width of its parent div?

I'm having trouble understanding why a flex div always occupies 100% width of its parent element. Consider the code snippet below: #wrapper { width: 100%; height: 100px; background: green; } #flex { color: white; display: flex; ...

Using three.js to detect mouseover events exclusively on objects, rather than on the

I am a newcomer to Three.js and I am attempting to display tooltips only on cubes or blocks. Fortunately, I found a helpful resource at . However, I noticed that the tooltip changes color and text on background checkboxes as well, which is not what I want ...

Ways to rotate SVG images exclusively upon clicking

After experimenting with rotating SVG images on my navbar buttons, I encountered an issue. Whenever I click one button, all the images rotate simultaneously. Additionally, clicking elsewhere does not reset the images to their original positions. This is t ...

The functionality of box-sizing: border-box does not seem to be working properly when used in

I am currently utilizing the Cleanslate tool to reset all CSS attributes on my widget container along with its children. I have also attempted to apply 'box-sizing: border-box' to all elements, but I am encountering unexpected behavior. Specific ...

CSS - Is there a way to alter the arrangement of DIVs depending on the size of the screen?

My inquiry pertains to a CSS layout. I currently have 3 divs positioned in a horizontal line next to each other, as depicted below... div1 div2 div3 I am aiming for the divs to reorganize themselves as the screen size decreases. In one scenario, they sho ...

Use JavaScript to dynamically change the value of an HTML input field based on the contents of a <li> list item

On my HTML page, I am dynamically creating <li> elements using an Autocomplete API. As you type in the input box, the API suggests the Website logo, website name, and website URL within the <li> elements. Currently, this functionality is workin ...

There is excessive space beneath the text

I am struggling with aligning text vertically to match the chevrons. I have attempted various CSS properties like removing paddings/margins, setting line-height to 1, using text-decoration: none, text-align: center, and vertical-align: middle on my <p&g ...

Manipulating the dimensions of table cells in HTML using PHP

//Apologies for the messy code and the mix of French, I am a beginner. All I want is to allow the user to choose the width and height of the cells. Please keep it as simple as possible. <form method="POST"> Number of Rows: <input ...

Formatting an HTML table for mobile devices

Hi everyone, I'm struggling to understand why my table is displaying incorrectly when switching to the mobile version. I've attempted various CSS adjustments to correct it, but the issue persists when viewed on mobile devices. Mobile view of the ...