• Home
  • Courses
  • School
  • Programs
  • Problems
  • Contact Us
  • My account
  • Register

Have any question?

(+91) 98222 16647
info@simplycoding.in
RegisterLogin
Simply Coding
  • Home
  • Courses
  • School
  • Programs
  • Problems
  • Contact Us
  • My account
  • Register

Web Designing

HTML Table Tags

  • Categories Web Designing, HTML, HTML
HTML Table tags

HTML Table Tags

Here we are going to cover HTML tables. You can watch our video to learn how to use HTML tables – click here.

The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.

Table is created with TABLE tag. All the content and other related tags of table are nested within this tag.

  • To create a row you use TR tag for each row in table tag.
  • Within TR tag you nest one or more TD tag to create column. It is left aligned by default.
  • If you have a header row, you use tag TH to define the header row. It is by default bold and centred.

These are nested as many number of time to achieve the desired number of rows and columns.

e.g.

This code will give an output like this.

1.      TABLE Attributes

It has attributes of border, bordercolor, frame, rules, bgcolor, background, cellpadding, cellspacing, height and width.

Note: align attribute will align the entire table with respect to screen

E.g.

border = 1

bordercolor = “green”

frame = “box”

rules = “all”

bgcolor = “red”

background = “test.png”

cellpadding = 5

cellspacing = 5

height = 30%

width = “30%”

 

2.       <td>, <th> attributes

Layout attributes: Align, valign, bgcolor, background, cellpadding, cellspacing, height and width. They are not part of HTML5 and recommended to be moved to CSS.

rowspan and colspan: It is used to specify the span of row or column (equivalent to merging rows or columns)

E.g.

align = “left”

valign = “top”

bgcolor = “red”

background = “test.png”

cellpadding = 5

cellspacing = 5

height = 30%

width = “30%”

rowspan = “2”

colspan = “3”

 

Other table tags

 

<caption>:  This gives title or explanation for the table and it shows up at the top of the table

       E.g.  <caption> Table showing student marks </caption>

<thead> − to create a separate table header.

<tbody> − to indicate the main body of the table.
<tfoot> − to create a separate table footer.

  • Share:
author avatar
Simply Coding

Previous post

HTML List Tags
June 14, 2021

Next post

Python Strings
June 14, 2021

You may also like

HTML List
HTML List Tags
14 June, 2021
Audio and Video tag in HTML
HTML Audio and Video tags
14 June, 2021
html
HTML: Question Bank
3 November, 2020

Leave A Reply Cancel reply

You must be logged in to post a comment.

Categories

  • Uncategorized
  • Programs
    • Python
    • Java
  • Problems
    • Python
    • Java
    • Web Development
      • Internet
    • Emerging Technologies
  • Notes
    • General
    • QBasic
    • MS Access
    • Web Development
      • XML
      • HTML
      • JavaScript
      • Internet
    • Database
    • Logo Programming
    • Scratch
    • Emerging Trends
      • Artificial Intelligence
      • Internet of Things
      • Cloud Computing
      • Machine Learning
    • Computer Fundamentals
      • Computer Networks
      • E-Services
      • Computer Hardware
    • Python
    • Java
  • School
    • ICSE
      • Computers Class 9
        • Java Introduction
        • Tokens & Data Types
        • Java Operators
        • Math Library
        • if & switch
        • For & While
        • Nested loops
      • Computer Class 10
        • Sample Papers
        • OOPS concepts
        • Functions in Java
        • Constructors
        • Arrays in Java
        • Strings in Java
    • SSC
      • IT Class 11
        • IT Basics
        • DBMS
        • Web Designing
        • Cyber Laws
      • IT Class 12
        • Web Designing
        • SEO
        • Advanced JavaScript
        • Emerging Tech
        • Server Side Scripting
        • E-Com & E-Gov
      • Computer Science 11
      • Computer Science 12
    • CBSE
      • Computer 9
        • Basics of IT
        • Cyber Safety
        • Scratch
        • Python
      • Computer 10
        • Sample Papers
        • Networking
        • HTML
        • Cyber Ethics
        • Scratch
        • Python
      • Computer Science 11
        • Computer Systems
        • Python 11
          • Python Basics
          • Python Tokens
          • Python Operators
          • Python if-else
          • Python loops
          • Python Strings
          • Python List
          • Python Tuple
          • Python Dictionary
          • Python Modules
        • Data Management
      • Computer Science 12
        • Sample Papers
        • Python 12
          • Python Functions
          • Python File Handling
          • Python Libraries
          • Python Recursion
          • Data Structures
        • Computer Networks
        • Data Management
    • ISC
      • Computer Science 11
        • Introduction to Java
        • Values & Data Types
        • Operators
        • if & switch
        • Iterative Statements
        • Functions
        • Arrays
        • String
        • Data Structures
        • Cyber Ethics
      • Computer Science 12
        • Sample Papers
        • Boolean Algebra
        • OOPS
        • Wrapper Classes
        • Functions
        • Arrays
        • String
Simply Coding Computer Courses for School                Privacy Policy     Terms of Use     Contact Us

© 2021 Simply Coding

Login with your site account

Lost your password?

Not a member yet? Register now

Register a new account

Are you a member? Login now