Monday, 14 December 2015

TABLES IN HTML

BASIC TABLE COMMANDS
                                                                                                            
A table is a series of columns and rows. Tables allow you to format information in rows and columns. These are the basic commands used on a table:

1.   <TABLE> … </TABLE> - The <TABLE>  is first tag which starts and closes a table.
2.   <TR>…</TR> - <TR> is a table row element which begins each new row. </TR> ends each row.
3.   <TD>…</TD> - Table data cells are formed using the table data element <TD>. </TD> must be used to close each table data cell.
4.  <TH>…</TH> - A centered heading in aa table is made using the table heading<TH> element inside a row.
5.  <CAPTION>…</CAPTION> - Each table may have an associated caption that provides a short description of the table purpose.

CELLPADDING
Cellpadding creates a minimum distance of “P” pixels between the contents of each table cell and the closest border of the cell.
<TABLE cellpadding= “10”>

CELLSPACING
Cellspacing  creates a minimum distance of “P” pixels between the cells in a table.
<TABLE cellspacing= “10”>

BORDER IN TABLE

 You can add border to your table using BORDER attribute . BORDERCOLOR is use to give a specific color to border.

inserting image in a web page

IMG Tag
The image tag is used for inserting images. The IMG tag is empty, meaning there is no closing tag. SRC attribute gives the URL of the image document.

CHANGING HEIGHT AND WIDTH OF IMAGE
These two size attributes define the width and height of image.
These are:  HEIGHT = n WIDTH= n

SETTING BORDER IMAGE
The border attribute specifies the width of image border.




LISTS IN HTML

LIST TYPES
HTML lists appear in web browser as bulleted lines of text. Thera are actually three types of lists in HTML.
 UNORDERED LISTS
ORDERED LISTS
 DEFINITION LISTS

                                                                                                                                                          
UNORDERED LIST
An unordered lists is a list of items which may appear in any particular order. It is usually displayed as a bulleted list of items. It starts with <UL>tag. Each list item starts with the <LI> tag.

ORDERED LIST

An ordered lists is a numbered list. The list items are marked with numbers. It starts with <OL>tag. Each list item starts with the <LI> tag.

next chapter of HTML!!

    The <BR> Tag For Line Breaks

The br tag is used to start a new line if we want. It starts with <BR>.

HR (HORIZONTAL RULE ELEMENT)
The hr element is used to draw a horizontal dividing line completely across a line. Each <HR> tag in  your document creates a shaded horizontal rule between text.

FORMATTING TAGS
BOLD Element
 The bold element(<b> and </b>) causes the text to appear in           bold typeface.
ITALIC Element
     The ITALIC element(<I> and </I>) causes the text to appear 
     in italics typeface.
    UNDERLINE element
    The underline element(<u> and </u>) underlines the text.
         
SUBSCRIPT AND SUPERSCRIPT ELEMENT
      A SUB and SUP elements are used to display the texts or   numbers in the form of subscript and superscript format resp. A subscript character appears slightly below the base line and superscript character appears slightly above the base line.   
WHAT IS HTML?
Ø HTML is a language for describing web pages.
Ø HTML stands for Hypertext Markup Language.
Ø HTML is not a programming language, it is a markup language.
Ø HTML uses markup tags to describe web pages.

2.2 WHAT IS HTML documents?
·      HTML documents describe web pages
·      HTML documents contain html tags and plain text.

2.3 HTML document tags
The first html tags you are going to look are document tags. They define different parts of html documents.
An html doc has two distinct parts- a head and a body. The head of html is where you enter the title of the page. To create a head portion in html doc, type the following-
<HEAD>
<TITLE> My first page </TITLE>
</HEAD>
The body is where you will enter text, graphics and all other web goodies. To create a body portion in html doc, type the following-
 <BODY>
Your text
</BODY>
2.4 HTML ELEMENT
The HTML element is contained within </HTML> tag. The HTML tag informs the browser that it is dealing with an html document. This element simply denotes that this is an html document.

BACKGROUND ATTRIBUTE
This allows you to specify an image file to use as a background behind the displayed text and graphics. There are two options that can be changed in the background.
·      bgcolor  changes the background to a solid color.
<html>
<head>
<title> background color</title>
</head>
<body bgcolor=”orange”>
<h1> hello my name is paramveer singh</h1>
</body>
</html>
FONT ELEMENT
The font element can let you change the size, color and type face of text on an html page. Font tags can be set for a character, sentence or an entire document.

Thank you
for more information , keep up with me!!!