SlideShare a Scribd company logo
1 of 5
Lecture 8

In this lecture, we will learn about

    -   How to create Table
    -   Escape Sequences: Special Characters

Tables are very useful while creating HTML pages; especially tables solve the alignment
problem. A table tag has headings where you explain what the columns/rows include,
rows for information, and cells for each item. In the following table, the first two rows
contain the heading information, each detail row explains an HTML table tag, and each
cell contains a paired tag or an explanation of the tag's function.

                                       Table Elements
    Element                                       Description
<TABLE> ...      defines a table in HTML. If the BORDER attribute is present, your
</TABLE>         browser displays the table with a border.
<CAPTION> ... </ defines the caption for the title of the table. The default position of the
CAPTION>         title is centered at the top of the table. The attribute ALIGN=BOTTOM
                 can be used to position the caption below the table.
                 NOTE: Any kind of markup tag can be used in the caption.
<TR> ... </TR>   specifies a table row within a table. You may define default attributes
                 for the entire row: ALIGN (LEFT, CENTER, RIGHT) and/or VALIGN
                 (TOP, MIDDLE, BOTTOM).
<TH> ... </TH>       defines a table header cell. By default the text in this cell is bold and
                     centered. Table header cells may contain other attributes to determine
                     the characteristics of the cell and/or its contents.
<TD> ... </TD>       defines a table data cell. By default the text in this cell is aligned left
                     and centered vertically. Table data cells may contain other attributes
                     to determine the characteristics of the cell and/or its contents.

Here is the single cell table, the simplest table possible.

<CENTER>

          <table border=1>

                    <tr>

                           <td>here is a single-celled table!</td>

                  </tr>
          </table>

</CENTER>
The output on the browser is
                               here is a single-celled table!


<html>
         <head>
               <title> Using Table Tag</title>
         </head>

         <body>
               <table border=1>
                      <caption> Time Table for Mar-June 2005</caption>
                      <tr>
                             <th></th>
                             <th>Monday</th>
                             <th>Tuesday</th>
                             <th>Wednesday</th>
                             <th>Thrusday</th>
                             <th>Friday</th>
                      </tr>

                       <tr>
                               <td>9:30-10:20</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
                               <td><font color="blue">109</font></td>
                       </tr>

                       <tr>
                               <td>10:30-11:20</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
                               <td><font color="blue">109</font></td>
                       </tr>

                       <tr>
                               <td>11:30-12:20</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
                               <td>-</td>
<td><font color="blue">109</font></td>
</tr>

<tr>
        <td>12:30-1:20</td>
        <td>-</td>
        <td>-</td>
        <td><font color="blue">312</font></td>
        <td>-</td>
        <td>-</td>
</tr>

<tr>
        <td>1:30-2:20</td>
        <td>-</td>
        <td><font color="blue">306</font></td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
</tr>

<tr>
        <td>2:30-3:20</td>
        <td>-</td>
        <td><font color="blue">306</font></td>
        <td>-</td>
        <td><font color="blue">309</font></td>
        <td>-</td>
</tr>

<tr>
        <td>3:30-4:20</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
        <td><font color="blue">309</font></td>
        <td>-</td>
</tr>

<tr>
        <td>4:30-5:20</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
        <td><font color="blue">309</font></td>
        <td>-</td>
</tr>
             <table>
       </body>
</html>

                Time Table for Mar-June 2005
              Monday Tuesday Wednesday Thrusday Friday
9:30-10:20    -      -        -           -    109
10:30-11:20   -      -        -           -    109
11:30-12:20   -      -        -           -    109
12:30-1:20    -      -        312         -    -
1:30-2:20     -      306      -           -    -
2:30-3:20     -      306      -           309  -
3:30-4:20     -      -        -           309  -
4:30-5:20     -      -        -           309  -




Escape Sequences: Special Characters (a.k.a. Character Entities)

Special characters are composed of short sequence of characters that are translated by the
browser and displayed as a single character.
Special characters begin with an ampersand(&) and end with a semicolon (;), for example
&nbsp, which is used for giving spaces between words or characters

To understand &nbsp; type the following code in notepad
<html>
       <head>
              <title>Using nbsp </title>
       </head>

       <body>
             My name is Harshit                 Kumar.
       </body>
</html>

The output is
My name is Harshit Kumar.

Although I gave so many spaces between “Harhsit” and “Kumar”, still the output shows
only one space.
This means that browser shrink the spaces, so to insert spaces, we need &nbsp;.

Type the following code in notepad
<html>
       <head>
              <title>Using nbsp </title>
       </head>

       <body>
       My name is Harshit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kumar.
       </body>
</html>


The output is
My name is Harshit          Kumar.

------------------------------------------------------Finish----------------------------------------------

More Related Content

What's hot (9)

HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html basics 9 meta background
Html basics 9 meta backgroundHtml basics 9 meta background
Html basics 9 meta background
 
Web Technology Lab File
Web Technology Lab FileWeb Technology Lab File
Web Technology Lab File
 
TYBSC prac soln
TYBSC prac solnTYBSC prac soln
TYBSC prac soln
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
 

Similar to Html basics 7 table

Similar to Html basics 7 table (20)

Web I - 03 - Tables
Web I - 03 - TablesWeb I - 03 - Tables
Web I - 03 - Tables
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
v4-html-table-210321161424.pptx
v4-html-table-210321161424.pptxv4-html-table-210321161424.pptx
v4-html-table-210321161424.pptx
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
HTML
HTMLHTML
HTML
 
Lecture 5 html table
Lecture 5 html tableLecture 5 html table
Lecture 5 html table
 
Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
Html
HtmlHtml
Html
 
Lecture-4.pptx
Lecture-4.pptxLecture-4.pptx
Lecture-4.pptx
 
WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
 
Xml and xslt
Xml and xsltXml and xslt
Xml and xslt
 
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptxRDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
 
05 01 tabelas
05 01 tabelas05 01 tabelas
05 01 tabelas
 
Session3 part2
Session3 part2Session3 part2
Session3 part2
 
table html web programing
table  html  web programingtable  html  web programing
table html web programing
 
Html Table
Html TableHtml Table
Html Table
 
Html&css lesson 2
Html&css lesson 2Html&css lesson 2
Html&css lesson 2
 
lklklk
lklklklklklk
lklklk
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
Html.pptx
Html.pptxHtml.pptx
Html.pptx
 

More from H K (20)

Assignment4
Assignment4Assignment4
Assignment4
 
Assignment3
Assignment3Assignment3
Assignment3
 
Induction
InductionInduction
Induction
 
Solution3
Solution3Solution3
Solution3
 
Solution2
Solution2Solution2
Solution2
 
Mid-
Mid-Mid-
Mid-
 
Assignment4
Assignment4Assignment4
Assignment4
 
Assignment4
Assignment4Assignment4
Assignment4
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3
 
Proof
ProofProof
Proof
 
Resolution
ResolutionResolution
Resolution
 
Assignment description
Assignment descriptionAssignment description
Assignment description
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2
 
Set
SetSet
Set
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1
 
Logic
LogicLogic
Logic
 
Introduction
IntroductionIntroduction
Introduction
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 sol
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solution
 
Violinphoenix
ViolinphoenixViolinphoenix
Violinphoenix
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Html basics 7 table

  • 1. Lecture 8 In this lecture, we will learn about - How to create Table - Escape Sequences: Special Characters Tables are very useful while creating HTML pages; especially tables solve the alignment problem. A table tag has headings where you explain what the columns/rows include, rows for information, and cells for each item. In the following table, the first two rows contain the heading information, each detail row explains an HTML table tag, and each cell contains a paired tag or an explanation of the tag's function. Table Elements Element Description <TABLE> ... defines a table in HTML. If the BORDER attribute is present, your </TABLE> browser displays the table with a border. <CAPTION> ... </ defines the caption for the title of the table. The default position of the CAPTION> title is centered at the top of the table. The attribute ALIGN=BOTTOM can be used to position the caption below the table. NOTE: Any kind of markup tag can be used in the caption. <TR> ... </TR> specifies a table row within a table. You may define default attributes for the entire row: ALIGN (LEFT, CENTER, RIGHT) and/or VALIGN (TOP, MIDDLE, BOTTOM). <TH> ... </TH> defines a table header cell. By default the text in this cell is bold and centered. Table header cells may contain other attributes to determine the characteristics of the cell and/or its contents. <TD> ... </TD> defines a table data cell. By default the text in this cell is aligned left and centered vertically. Table data cells may contain other attributes to determine the characteristics of the cell and/or its contents. Here is the single cell table, the simplest table possible. <CENTER> <table border=1> <tr> <td>here is a single-celled table!</td> </tr> </table> </CENTER>
  • 2. The output on the browser is here is a single-celled table! <html> <head> <title> Using Table Tag</title> </head> <body> <table border=1> <caption> Time Table for Mar-June 2005</caption> <tr> <th></th> <th>Monday</th> <th>Tuesday</th> <th>Wednesday</th> <th>Thrusday</th> <th>Friday</th> </tr> <tr> <td>9:30-10:20</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td><font color="blue">109</font></td> </tr> <tr> <td>10:30-11:20</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td><font color="blue">109</font></td> </tr> <tr> <td>11:30-12:20</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td>
  • 3. <td><font color="blue">109</font></td> </tr> <tr> <td>12:30-1:20</td> <td>-</td> <td>-</td> <td><font color="blue">312</font></td> <td>-</td> <td>-</td> </tr> <tr> <td>1:30-2:20</td> <td>-</td> <td><font color="blue">306</font></td> <td>-</td> <td>-</td> <td>-</td> </tr> <tr> <td>2:30-3:20</td> <td>-</td> <td><font color="blue">306</font></td> <td>-</td> <td><font color="blue">309</font></td> <td>-</td> </tr> <tr> <td>3:30-4:20</td> <td>-</td> <td>-</td> <td>-</td> <td><font color="blue">309</font></td> <td>-</td> </tr> <tr> <td>4:30-5:20</td> <td>-</td> <td>-</td> <td>-</td> <td><font color="blue">309</font></td> <td>-</td>
  • 4. </tr> <table> </body> </html> Time Table for Mar-June 2005 Monday Tuesday Wednesday Thrusday Friday 9:30-10:20 - - - - 109 10:30-11:20 - - - - 109 11:30-12:20 - - - - 109 12:30-1:20 - - 312 - - 1:30-2:20 - 306 - - - 2:30-3:20 - 306 - 309 - 3:30-4:20 - - - 309 - 4:30-5:20 - - - 309 - Escape Sequences: Special Characters (a.k.a. Character Entities) Special characters are composed of short sequence of characters that are translated by the browser and displayed as a single character. Special characters begin with an ampersand(&) and end with a semicolon (;), for example &nbsp, which is used for giving spaces between words or characters To understand &nbsp; type the following code in notepad <html> <head> <title>Using nbsp </title> </head> <body> My name is Harshit Kumar. </body> </html> The output is My name is Harshit Kumar. Although I gave so many spaces between “Harhsit” and “Kumar”, still the output shows only one space.
  • 5. This means that browser shrink the spaces, so to insert spaces, we need &nbsp;. Type the following code in notepad <html> <head> <title>Using nbsp </title> </head> <body> My name is Harshit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kumar. </body> </html> The output is My name is Harshit Kumar. ------------------------------------------------------Finish----------------------------------------------