How To Draw A Table In HTML

Table of contents:

How To Draw A Table In HTML
How To Draw A Table In HTML

Video: How To Draw A Table In HTML

Video: How To Draw A Table In HTML
Video: 25: Table In HTML and CSS | How To Create Tables | Learn HTML and CSS | HTML Tutorial | CSS Tutorial 2024, November
Anonim

HTML is a page markup language that can be used to host websites on the Internet. To format the document in this case, tags are used - description elements.

How to draw a table in HTML
How to draw a table in HTML

Necessary

  • - computer;
  • - the "Notepad" program;
  • - skills in working with HTML.

Instructions

Step 1

Open your page where you want to add a table in HTML using Notepad. To do this, right-click on the file to bring up the context menu, select the "Open with" option. Select a place in the Body tag to add the table to the site.

Step 2

Use the… tag to place the table in Html. This is the main tag that describes the table. All of its elements must be located between the opening and closing tags. By default, the table is created without separators and borders. Add border as needed using the Border attribute. To do this, insert it inside the table tag and add a numeric value for the width of the border, for example, a row in the table. To do this, use the … tag, the number of lines is determined by the number of its pairs. Add a cell description using the… tag. Place the cell only inside the row tag, add to it the number of the column (column) in which it is placed.

Step 4

Determine the location of the text in the cell using the attributes Aligh (left, right, center) - determines the placement of the text horizontally, and Valign (middle, bottom, top) - determines the placement of data in the cell vertically. This description can be added both for an individual cell and for the entire row.

Step 5

Use the Colspan attribute to combine cells horizontally and Rowspan vertically. An example of a table code: “Table name” “Name of the merged row” “Name of the first column” “Name of the second column” “Second row” “Second cell of the second row” “Third cell of the second row”.

Recommended: