Developing visually appealing HTML tables with CSS styles

I'm currently working on a website project and I'm looking to incorporate a table similar to the one shown in the image. While I am familiar with HTML tables, I'm struggling to recreate this specific layout. Despite my best efforts, I haven't been able to achieve the desired outcome. Any guidance or tips on how to develop this particular table would be greatly appreciated.

https://i.sstatic.net/MpuNt.png

<table class="table table-bordered table-responsive" style="border-collapse: collapse; text-align: center; float: right;" border="1">
  <tbody>
    <tr>
      <td></td>
      <td style="text-align: center;" colspan="2">Table Data</td>
    </tr>
    <tr>
      <th>Type </th>
      <th>Orders<br />Phone/Fax/Email/Post</th>
      <th>Number</th>
    </tr>
  </tbody>
  <tbody>
    <tr>
      <td>Type 1</td>
      <td>Order 1</td>
      <td>Num 1</td>
    </tr>
    <tr>
      <td>Type 2</td>
      <td>Order 2</td>
      <td>Num 2</td>
    </tr>
    <tr>
      <td>Type 3</td>
      <td>Order 3</td>
      <td>Num 3</td>
    </tr>
    <tr>
      <td>Type 4</td>
      <td>Order 4</td>
      <td>Num 4</td>
    </tr>
    <tr>
      <td>Type 5</td>
      <td>Order 5</td>
      <td>Num 5</td>
    </tr>
  </tbody>
</table>

The code provided above has not yielded the desired output that I am aiming for.

Answer №1

  1. Open
  2. Export as
  3. select new name
  4. change file format to XHTML Document
  5. examine XHTML code

To manually create this chart, consider utilizing colspan and rowspan or refer to this helpful SO post

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

Issues with displaying the favicon on browser search results in a React.js website hosted on Hostinger

Having a React.js application hosted on Hostinger, the icon displayed next to the website title in search results (known as favicon.ico) is not functioning properly. https://i.sstatic.net/zgLu4.png This is my index.html file: <html lang="en"> ...

Leverage Html5 to open and retrieve data from an Excel document

Is there a method to access excel file data using HTML5 while uploading the file on the client side? I have come across the use of reader in JavaScript, but unsure how it can be helpful in this scenario. Is there a way to read excel file data seamlessly ...

Tips for finishing a row of images using CSS3

Here is the code snippet that I am currently working with: <div id="images" class="img"/> <img src="spiderman.png" alt=""/> <img src="superman.png" alt="" height="25%" width="25%"/> <img src="batman.png" alt="" /> </div> ...

"Populate a div with an array of images extracted from a JSON file

I found a website that provides an array of images like the sample below. { "imageUrl":"http://server06.amobee.com/aspx/nadav/test/banner320x50.png", "expandedImageUrl":"http://server06.amobee.com/aspx/nadav/test/banner320x320.jpg" } My ob ...

Creating a gaming application with Phaser.js and Ionic with subpar rendering capabilities

Attention developers! I recently created a game app using Phaser.js. I integrated the code into an Ionic blank starter app, allowing the Ionic framework to render the view while Phaser takes care of displaying the game. Issue: The game is a simple flapp ...

Toggle visibility with JQuery's onClick event

I am looking for a way to toggle the visibility of text that has display: none; in CSS when a button is clicked, as well as clear the input field on the onClick event. Currently, the text remains visible even after it has been displayed. Any assistance wou ...

What are some ways to slow down the speed of a canvas animation?

I am currently working on an animation project using JavaScript and canvas. I have a reference fiddle where objects are generated randomly and fall from the top right corner to the bottom left corner, which is fine. However, the issue is that the objects a ...

Safari scrolling with a sleek black background

When I overscroll over the viewport in Safari, a black line appears on the app in all directions. However, in Chrome, this line is white. Even though I have "theme_color": "#ffffff" set in my manifest.json, the issue persists in Safari ...

Customizing nvd3 chart colors with CSS: A step-by-step guide

Currently, I am faced with a challenge in SugarCRM as I try to modify the colors of nvd3 charts using CSS. The pie chart colors are structured differently compared to other nvd3 charts, making it difficult for me to figure out how to customize them through ...

Eliminate the Border from Bootstrap 5 navigation-toggler through standard css styling

I am trying to eliminate the light grey border around the mobile 'hamburger' menu. I am utilizing font-awesome and Bootstrap 5 (imported through CDN) to create it, but I can't figure out how to get rid of the rounded border. html <na ...

Display a message on the webpage itself, not in a pop-up, when the value exceeds 1 using JavaScript

I need help with a condition involving a variable called "truecount." If this value is less than one, I would like to display an error message on the screen instead of an alert popup. Could someone assist me with this? I am new to this and don't have ...

Create a moving background gradient with styled-components

Currently, I am working on setting the background of the <Paper /> component using Material-UI version 1.0.0-beta.25 to display a gradient of colors. The colors are dynamically added by clicking the Add button and selecting one from the color picker. ...

The HTML pattern [A-Za-z] specifies that the entered name must adhere to the required format, such as inputting "john"

<div class="title details"> <label for="idtitle" class="label">Title</label> <input type="text" placeholder="Title" id="idtitle" pattern="[A-Za-z]" required> </div> Link to Firefox screenshot ...

Next JS and the power of media queries

I've been searching for a while now, but I just can't seem to find a solution to my problem. I'm attempting to utilize different files for my media query breakpoints in Next JS, but they don't appear to be working. I created the files ...

Adding several <div> elements with the correct indices

I need help with a dynamic form that requires users to select a state before revealing the corresponding cities within that state. <form method="post"> <div class="summary"> <div class="trip"> <select name="State" class="s ...

The content momentarily flashes on the page during loading even though it is not visible, and unfortunately, the ng-cloak directive does not seem to function properly in Firefox

<div ng-show="IsExists" ng-cloak> <span>The value is present</span> </div> After that, I included the following lines in my app.css file However, the initial flickering of the ng-show block persists [ng\:cloak], [ng-cloak], ...

incorporating numerous interconnected javascript files within a single html document

I have a pair of JavaScript files (file1, file2). File1 utilizes a class that is defined in file2. Can I include these files in an HTML document like this: <script type="text/javascript" src="file1.js"></script> <script type="text/javascrip ...

Is there a way to create a continuous loop for the answer without requiring a page refresh?

Could use some assistance with this code. I'm looking to have a response selected randomly from the array, but every time I inspect the code in my browser, I need to refresh the page to get a new random response. Additionally, I'd appreciate some ...

Is there a way to compel the browser to re-cache an image?

In my website, each user has a cover image on their profile page with the constant name main_cover.jpg. The issue I am facing is that when a user uploads a new image, the old image remains cached in the browser and I have to refresh the page (ctrl+f5) to ...

The functionality of the angularjs class seems to be malfunctioning

I'm a new learner of angularjs and I've created a simple page below. I have a style called "item" that I'm trying to apply to a div, but it's not working. However, if I use inline style, then it works fine. Can someone please help me f ...