html

Table Tag in HTML | Attributes of Table Tag | Important Tags in HTML

Table Tag in HTML | Attributes of Table Tag

In this article, we will talk to you about table tag of HTML. If you are a beginner then you should definitely learn about table tag in HTML. In this article, you can get information about the attributes of table tag. We collect this all information from self-practical work. And we also check the articles of W3SCHOOL. W3school is a very good website to learn about HTML.




About Table Tag:

<TABLE> tag defines a table. If you want to draw a table in your web page then you should use table tag in your source code. If you want to draw table then you should know <TH> tag, <TR> tag and <TD> tag.  Here <TH> tag defines a table header and <TR> tag defines table row and <TD> tag defines table data.

Table Tag:

TAG Description
<table> It defines a table.
<th> It defines a table header.
<td> It defines a table data.
<tr> It defines a table row.





Some Attributes of Table Tag:

  1. Border: Border attribute specifies the width of the border of the table. If you want to draw border in your table then you should use border attribute in table tag.
  2. Cellpadding: Cellpadding attribute specifies the space between the cell wall and the cell content.
  3. Cellspacing: Cellspacing attribute specifies the space between two cells. If you want to leave some space in two cells then you should use Cellspacing attribute in table tag.
  4. Align: Align attribute specifies the alignment of values in a table. It can be align a value in left, right and centre.
  5. Width: Width attribute specifies the width of a table. If you want to set width of a table then you should use width attribute in table tag.
  6. Bgcolor: Bgcolor attribute specifies the background color of a table. If you want to use a background color in your table then you should use bgcolor attribute in table tag.





Attributes for <th> and <td> tag:

Attribute Name Type of Value
Align Left, Right, Centre
Bgcolor Color name, rgb(), hexcode
Colspan Number
Rowspan Number
Height Pixel or Percentage
Valign Top, Middle, Bottom
Width Pixel or Percentage

 

Source Code of Table Tag is given below:

<html>

<head>

<title>Table Tag in HTML</title>

</head>

<body>

<table border="2px" bgcolor="sky blue" cellspacing=0px cellpadding=5px width=400>

<tr>

<th>Sr. No.</th>

<th>Name</th>

<th>Age</th>

</tr>

<td>1</td>

<td>Skillmaking</td>

<td>21</td>

</table>

</body>

</html>



Output of TABLE TAG in HTML:
table-tag-in-html

Conclusion:

Now finally, I hope that you have good knowledge of table tag and the attributes of the table tag after reading this article. In this article, we got information about the table tag and the attributes of table tag. Thank you for read this article till the end. If you have any questions regarding this article then you should comment down below in the comment section. And you should share your thoughts regarding this article.  You should also read our more articles regarding web development. I give you some links below, hope you will also love those articles.

List Tag in HTML

Form Tag in HTML

The World’s Best Web Development Courses in 2020

html

List Tag in HTML | Ordered List & Unorderd List

List Tag

List tag is used for create a list in html document. We have two type of list tag:

  • Unordered List
  • Ordered List





Unordered List:

  • Unordered list starts with the <UL> tag.
  • Each list item starts with the <LI> tag.
  • The list items are marked with bullets (typically small black circles).

Attribute Type:

  • Square
  • Disc
  • Circle

Example:

list-ul-html

Output:




list-ul-output

Ordered List:

  • Ordered list starts with the <OL> tag.
  • Each list item starts with the <LI> tag.
  • The list items are marked with numbers.

Attribute type:

  • Numbers (Default)
  • Uppercase Letters
  • Lowercase Letters
  • Uppercase Roman Numbers
  • Lowercase Roman Numbers

Example:

list-ol




Output:

list-ol-output

html

Image Tag & It’s Attributes in HTML | Important Tags in HTML

Image Tag <IMG>

 

Like us on Facebook to get more updates





Image Tag is used for display a image in a webpage. If you want to display a image in a your html document then you should use <IMG> tag. In <IMG> tag, we provide a url of image which want to display. <IMG> tag is a empty tag. Image tag has many attributes to provide an awesome look of a picture. The important attribute of image tag is SRC attribute. Because it is used to provide url of the image.

Some basic attributes are given below:

  • SRC: SRC attribute is used to provide a unique url of image. This is very important attribute for image tag. If you don’t use this attribute then you can’t display a image.
  • ALT: This is a attribute of image tag. This attribute is used to display some alternative text at image. This is a important attribute for SEO. If our image can’t display due to any cause then ALT tag is display some text in the place of image.
  • WIDTH & HEIGHT: Both are also a important attributes for a image. They are used to adjust width & height of a image. If you want to adjust image size then this attribute will be used. You need to provide some value for width & height. The value will be given in pixel or percentage.
  • ALIGN: This attribute is also an important attribute for a image. This attribute is used to set alignment for a image. You can align a image at top, bottom, middle, left and right.
  • BORDER: This attribute makes more attractive display for a image. This attribute provides border for a image. You can set border size in pixels.





The source code & output for image tag is given below:

<HTML>

<HEAD>

<TITLE>Image Tag</TITLE>

</HEAD>

<BODY>

<IMG SRC=”image/image.png” ALT=” THIS IS SKILLMAKING.COM” WIDTH=700 HEIGHT=500 ALIGN=RIGHT BORDER=20PX/>

</BODY>

</HTML>




OUTPUT OF IMAGE TAG:

imagetag