Ram
Ram

Reputation: 195

Tables are not working in my GitHub Pages site

I have a table with three columns and multiple rows. The table is working fine in the repository but if I add the .md file to my GitHub Pages site the table remains raw. I know that all the GitHub Pages will be regenerated as .html file(s) and all the HTML tags are operating respectively. How can I project the table without HTML tags?

This works:

<table>
  <tr>
    <th>var</th>
    <th>let</th>
    <th>const</th>
  </tr>
  <tr>
    <td>
      Declares a variable, optionally initializing it to a value.
    </td>
    <td>
      Declares a block-scoped, local variable, optionally initializing it to a value.
    </td>
    <td>
      Declares a block-scoped, read-only named constant.
    </td>
  </tr>
  ...
</table>

This doesn't:

## Variable Declarations
| **var** | **let** | **const** |
|-----|-----|-----|
| Declares a variable, optionally initializing it to a value. | Declares a block-scoped, local variable, optionally initializing it to a value. | Declares a block-scoped, read-only named constant. |
| Variable declared by **`var`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. | Variable declared by **`let`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. | Variable declared by **`const`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. |

Here is the full source, and here is the rendered output for your reference.

Upvotes: 1

Views: 1465

Answers (1)

Chris
Chris

Reputation: 136910

The problem is almost certainly that you've neglected to put a blank line before your table. Try this instead:

## Variable Declarations

| **var** | **let** | **const** |
|-----|-----|-----|
| Declares a variable, optionally initializing it to a value. | Declares a block-scoped, local variable, optionally initializing it to a value. | Declares a block-scoped, read-only named constant. |
| Variable declared by **`var`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. | Variable declared by **`let`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. | Variable declared by **`const`** must start with a letter, underscore ( _ ) or dollar sign ($) and can contain alphabetic, numeric, or underscore characters. |

Upvotes: 5

Related Questions