How To Insert A Table Into A Website

Table of contents:

How To Insert A Table Into A Website
How To Insert A Table Into A Website

Video: How To Insert A Table Into A Website

Video: How To Insert A Table Into A Website
Video: How to Insert a Table into a Webpage 2024, November
Anonim

The markup languages HTML, Wiki, and BB-Code have tools for creating tables. This allows you to place information on the comparative characteristics of certain objects, statistical and other data into the documents or messages of the forum.

How to insert a table into a website
How to insert a table into a website

Instructions

Step 1

To create a table in an HTML document, first open it with the tag

… After that, open its first line with the tag

(TR is short for table row, that is, a table row). Now you can insert the desired number of cells into the string. Design each of them by opening the tag

… Here, the abbreviation TD stands for table data, that is, table data. Having placed the required number of cells in this way, close the line with the ta

… When all rows have been entered, close the table itself using the tag

by entering data after it and then placing a closing tag

eg:

Premises Number of sockets
Hallway 1
Bathroom 0
Kitchen 2
Room 3
Balcony 0

Step 2

By adding to the tag

parameters, you can change the color and thickness of its lines. So that the outer perimeter of the table is one pixel thick, and the inner lines are two pixels thick, and all this is painted in dark blue, use this construction:

Step 3

To merge multiple cells horizontally, use in conjunction with the tag

colspan parameter. So, if you write

you get a cell with a width of two columns

Step 4

When composing a forum post that uses BB-Code, use the same tags to create tables, but use square brackets instead of angle brackets. It might look like this:

[table]

[tr] [td] Room [/td] [td] Number of sockets [/td] [/tr]

[tr] [td] Hallway [/td] [td] 1 [/td] [/tr]

[tr] [td] Bathroom [/td] [td] 0 [/td] [/tr]

[tr] [td] Kitchen [/td] [td] 2 [/td] [/tr]

[tr] [td] Room [/td] [td] 3 [/td] [/tr]

[tr] [td] Balcony [/td] [td] 0 [/td] [/tr]

[/table]

This technique does not work in all forums, and not all tags are supported in those that have the corresponding function.

Step 5

In the Wiki markup language, format tables as shown below:

{|

| Premises

| Number of sockets

|-

| Hallway

|1

|-

| Bathroom

|0

|-

| Kitchen

|2

|-

| Room

|3

|-

| Balcony

|0

|}

Sign | is used here to move to the next cell, and | - is used for line feed.

Recommended: