> Online tutorial : HTML table
Showing posts with label HTML table. Show all posts
Showing posts with label HTML table. Show all posts

HTML list

HTML list
List is nothing but the collection of items or elements.There are two type of list are
ordered list,unordered list

UnOrdered List:

UnOrdered List is used for simply using listing the items but if we want the items in the sequence then ordered lists are used.

HTML Unordered List Example
    <html>
    <body>
    <b>Fruit List</b>
    <ul type='disc'>
    <li>Orange</li>
    <li>Apple</li>
    <li>Pine apple</li>
    </ul>
    <b>Sports List</b>
    <ul type='square'>
    <li>Cricket</li>
    <li>Foot Ball</li>
    <li>Hockey</li>
    </ul>
    <b>Country List</b>
    <ul type='circle'>
    <li>India</li>
    <li>Usa</li>
    <li>UK</li>
    </ul>
    </body>
    </html>

Output of Unordered List
  • Orange
  • Apple
  • Pine apple
Sports List
  • Cricket
  • Foot Ball
  • Hockey
Country List
  • India
  • Usa
  • UK
    Ordered List:
                  Ordered List is used for simply using listing the items but the follow some specific.we can use number the text using ol tag.
    Example

    <html>
    <body>
    <b>Fruit List</b>
    <ol type='1'>
    <li>Orange</li>
    <li>Apple</li>
    <li>Pine apple</li>
    </ol>
    <b>Sports List</b>
    <ol type='A'>
    <li>Cricket</li>
    <li>Foot Ball</li>
    <li>Hockey</li>
    </ol>
    <b>Country List</b>
    <ol type='i'>
    <li>India</li>
    <li>Usa</li>
    <li>UK</li>
    </ol>
    </body>
    </html>

    output

    1. Orange
    2. Apple
    3. Pine apple
    Sports List
    1. Cricket
    2. Foot Ball
    3. Hockey
    Country List
    1. India
    2. Usa
    3. UK

    HTML audio

    Audio
    using html script we can play the audio files.The simplest way to play the audio use the hyperlinks.

    Syntax:

    <a href="location of file'>name of the audio</a>


    Syntax


    <html>
    <head>
    <title>
    HTML checkbox
    </title>
    </head>
    <body>
    <form name='form1'>
    <a href="chimes.wav'>Click the audio</a>
    </form>
    </body>
    </html>



    HTML spacing

    Cellspaing
    Cellspacing is allows create distance from each cell can be increased.
    Example

    <html>
    <head>
    <title>
    HTML cellspacing
    </title>
    </head>
    <body>
    <table border="1" cellspacing="20">
    <tr>
    <td>one</td>
    <td>second</td>
    </tr>
    <tr>
    <td>Three</td>
    <td>four</td>
    </tr>
    </table></body>
     </html>


    Output

    one second
    Three four

    HTML cellpadding

    Cellpadding
    Cellpadding is allows to have some space between of each cell and it is borders(or inner edges)
    Example

    <html>
    <head>
    <title>
    HTML cellpadding
    </title>
    </head>
    <body>
    <table border="1" cellpadding="8">
    <tr>
    <td>one</td>
    <td>second</td>
    </tr>
    <tr>
    <td>Three</td>
    <td>four</td>
    </tr>
    </table></body>
     </html>


    Output
    one second
    Three four

    HTML table

    HTML table tags
    The table is a matrix of rows and columns and one area formed due to interaction of a row and a column is called cell
    To create a table on the web page the table beginning tag is <table>and </table>tag it is used to ending the tag.
    <html>
    <head>
    <title>
    HTML Table
    </title>
    </head>
    <body>
    <table border="6">
    <caption align="bottom">
    </caption>
    <tr>
    <td>This is left cell row1</td>
    <td>This is right cell row1</td>
    </tr>
    <tr>
    <td>This is left cell row2</td>
    <td>This is right cell row2</td>
    </tr>
    </table>
    </body>
    </html>



    Output


    This is left cell row1 This is right cell row1
    This is left cell row2 This is right cell row2