How to Add a Table Into HTML File
Add the code elements that insert the Table Title like shown below: 'th' tags define headings, they centre the headings and display it in bold by default; 'COLSPAN=n' – is used to span the title across the columns, “n” – describes the number of...
Step-by-Step Guide
-
Step 1: Add the code elements that insert the Table Title like shown below: 'th' tags define headings
Since we have 3 columns in our table, 'colspan=3' in this example -
Step 2: they centre the headings and display it in bold by default; 'COLSPAN=n' – is used to span the title across the columns
, Write the following code elements into your HTML file.
As you can see in the example above,an extra row ('tr') was included in order to create Columns 1,2 and
3.
The individual columns are defined by 'th' tags.
Since these codes, by default, centre the headings and set them in bold, no other attributes were included in the headings -
Step 3: “n” – describes the number of columns.
, -
Step 4: If you want to enlarge the Table Title and insert an extra line above it
-
Step 5: write the following code: 'h3' will tell the browser to display the Title in a larger font; 'br' - is used in order to create a space above the Table Title.
-
Step 6: Add individual column headings - Column 1
-
Step 7: Column 2
-
Step 8: Column 3.
-
Step 9: Save the file as Table 3 with .html extension:
-
Step 10: Open your Table 3 file in your browser
-
Step 11: your table will be displayed in the following form:
Detailed Guide
Since we have 3 columns in our table, 'colspan=3' in this example
, Write the following code elements into your HTML file.
As you can see in the example above,an extra row ('tr') was included in order to create Columns 1,2 and
3.
The individual columns are defined by 'th' tags.
Since these codes, by default, centre the headings and set them in bold, no other attributes were included in the headings
,
About the Author
Lisa Miller
Brings years of experience writing about cooking and related subjects.
Rate This Guide
How helpful was this guide? Click to rate: