HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages.
HTML
NEELESH //HYPER TEXT NOT MARKUP TAG
BODY
SCRIPT
-----------------------------------------------------------
Commnet
Ignoring data
1.single line comment
sy
ex
2.multi line comment
sy
ex
---------------------------------------------------------------
Line Break Tag
--------------------------------------------------------
Nonbreaking Spaces
  = non Breaking Space
---------------------------------------------------------
Attributes and Perameters
-------------------------------------------------------------------
Attributes Perameters
bgcolor color name or Hexadecimal code
background any image
text color name or Hexadecimal code
bgcolor is attribute
red is perameter
----------------------------------------------------
Heading Tags
Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements
,
,
,
,
, and
. While displaying any heading, browser adds one line before and one line after that heading.
heading tag
Attribute align -> left, right,center
---------------------------------------------------------------------------------------------
Paragraph Tag
The
tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening
and a closing
tag as shown below in the example:
----
Attribute align -> left, right,center,justify
-----------------------------------------------------------
Horizontal Rule
Empty Tag + Block
color color name or Hexadecimal code
size pix
width pix % ---100%--
align left, right, --CENTER--
noshade
---------------------------------------------------------
Core Attributes
The four core attributes that can be used on the majority of HTML elements (although not all) are:
id
title
class
style
--------------------------------------------------------------
Presentation Tags
These all tags Are Container Tags
Bold
.............................................
ITALIC
STRIKE
UNDERLINE
SUPER SCRIPT
SUB SCRIPT
SIZE
DOUBLE QUOTE
Monospaced Font
...
CENTER
Marked Text
Pre Formated Text
-------------------------------------------------------------------
Font
changing Text size, color,font type
color color name or Hexadecimal code
size 1 to 7
face font family name like times new roman, tahoma
---------------------------------------------------------------------
IMG
====
src image source
alt alternate source
hight
width
border
hspace
vspace
----------------------------------------------------------------
Table
=====
An HTML table is defined with the
tag.
Each table row is defined with the
tag.
A table header is defined with the
tag.
By default, table headings are bold and centered.
A table data/cell is defined with the
tag.
====================================================
Use the HTML
element to define a table
Use the HTML
element to define a table row
Use the HTML
element to define a table data
Use the HTML
element to define a table heading
Use the HTML
element to define a table caption
Use the CSS border property to define a border
Use the CSS border-collapse property to collapse cell borders
Use the CSS padding property to add padding to cells
Use the CSS text-align property to align cell text
Use the CSS border-spacing property to set the spacing between cells
Use the colspan attribute to make a cell span many columns
Use the rowspan attribute to make a cell span many rows
Use the id attribute to uniquely define one table
=====================================================
Tag Description
It defines a table.
It defines a row in a table.
It defines a header cell in a table.
It defines a cell in a table.
It defines the table caption.
It specifies a group of one or more columns in a table for formatting.
It is used with
element to specify column properties for each column.
--------------------------------------------------
BORDER
BGCOLOR
WIDTH
CELLPADDING
CELLSPACING
VALIGN vertical Alignment
ALIGN horizontal alignment
COLSPAN
ROWSPAN
bgcolor --> color name
width--> pix,%
align--> left,right,center
valign-->top,middle,bottom
border-->pix
cellspacing-->pix
cellpadding-->pix
colspan-->number
/
rowspan-->number
/
span-->number
HTML Table - Adding a Border
If you do not specify a border for the table, it will be displayed without borders.
A border is set using the CSS border property:
table, th, td {
border: 1px solid black;
}
----------------------------
Collapsed Borders
If you want the borders to collapse into one border, add the CSS border-collapse property:
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
------------------------------.
Adding Cell Padding
Cell padding specifies the space between the cell content and its borders.
If you do not specify a padding, the table cells will be displayed without padding.
To set the padding, use the CSS padding property:
Example
th, td {
padding: 15px;
}
---------------------------------
HTML Table - Left-align Headings
By default, table headings are bold and centered.
To left-align the table headings, use the CSS text-align property:
Example
th {
text-align: left;
}
-------------------------------
HTML Table - Adding Border Spacing
Border spacing specifies the space between the cells.
To set the border spacing for a table, use the CSS border-spacing property:
Example
table {
border-spacing: 5px;
}
-------------------------------
HTML Table - Cells that Span Many Columns
To make a cell span more than one column, use the colspan attribute:
Example
Name
Telephone
Bill Gates
55577854
55577855
------------------------------
HTML Table - Cells that Span Many Rows
To make a cell span more than one row, use the rowspan attribute:
Example
Name:
Bill Gates
Telephone:
55577854
55577855
-------------------------------
HTML Table - Adding a Caption
To add a caption to a table, use the
tag:
Example
Monthly savings
Month
Savings
January
$100
February
$50
--------------------------------
A Special Style for One Table
To define a special style for a special table, add an id attribute to the table:
Example
Firstname
Lastname
Age
Eve
Jackson
94
-------------------------------------------------------------------
Link
=====
name= any name
href= url
target= _blank _perent
google
Hyperlinks
it allows to traverse contents of a website by just clicking,no need to enter address of individual content in address bar
types of hyperlinks
1. interlink
linking different pages to each other
link caption
a anchor (which connects)
href here refers to
2. intralink
linking content within a same page
step 1. create a named location
Location Title
step 2. make a link to jump to named location
Link Caption
#prefix is used to go to a location, else it looks for file/folder with given name
3. combination of inter and intra
linking a specific location on another webpage
step 1. create a named location on page1.html
Location Title
step 2. make a link to jump to named location
on page2.html
Link Caption
for external links, prefix http:// is must
Data can be passed with hyperlink, it is known as query string
its syntax is
filename.php?variable1=value1&variable2=value2&variable3=value3&...
delimiter between filename and first variable is ?
delimiter between a variable and its value is =
delimiter in between pairs of variable value is &
add.php?fnum=5&snum=10
calc.php?fnum=5&snum=10&work=multiply
table.php?fnum=13
Table
They are used to give proper layout to a webpage
layout can be maintained via rows and cells in it
-----------------------------------------------
list
====
HTML Lists
HTML Lists are used to specify lists of information. All lists may contain one or more list elements. There are three different types of HTML lists:
Ordered List or Numbered List (ol)
Unordered List or Bulleted List (ul)
Description List or Definition List (dl)
----
----
----
----------------------------------------------
HTML Ordered List or Numbered List
============
In the ordered HTML lists, all the list items are marked with numbers. It is known as numbered list also. The ordered list starts with tag and the list items start with
tag.
HTML Ordered List or Numbered List displays elements in numbered format. The HTML tag is used for ordered list. There can be different types of numbered list:
Numeric Number (1, 2, 3)
Capital Roman Number (I II III)
Small Romal Number (i ii iii)
Capital Alphabet (A B C)
Small Alphabet (a b c)
Type Attribute
==============
To represent different ordered lists, there are 5 types of attributes in tag.
Type Description
Type "1" This is the default type. In this type, the list items are numbered with numbers.
Type "I" In this type, the list items are numbered with upper case roman numbers.
Type "i" In this type, the list items are numbered with lower case roman numbers.
Type "A" In this type, the list items are numbered with upper case letters.
Type "a" In this type, the list items are numbered with lower case letters.
Output:
I HTML
II Java
III JavaScript
IV SQL
ol type="i"
Let's see the example to display list in roman number lowercase.
HTML
Java
JavaScript
SQL
Test it Now
Output:
i HTML
ii Java
iii JavaScript
iv SQL
ol type="A"
Let's see the example to display list in alphabet uppercase.
HTML
Java
JavaScript
SQL
Test it Now
Output:
A HTML
B Java
C JavaScript
D SQL
ol type="a"
Let's see the example to display list in alphabet lowercase.
HTML
Java
JavaScript
SQL
Test it Now
Output:
a HTML
b Java
c JavaScript
d SQL
start attribute
===============
The start attribute is used with ol tag to specify from where to start the list items.
: It will show numeric values starting with "5".
: It will show capital alphabets starting with "E".
: It will show lower case alphabets starting with "e".
: It will show Roman upper case value starting with "V".
: It will show Roman lower case value starting with "v".
HTML
Java
JavaScript
SQL
Test it Now
Output:
v HTML
vi Java
vii JavaScript
viii SQL
-------------------------------------------------
HTML Unordered List or Bulleted List
In HTML Unordered list, all the list items are marked with bullets. It is also known as bulleted list also. The Unordered list starts with
tag and list items start with the
tag.
Aries
Bingo
Leo
Oracle
Output:
Aries
Bingo
Leo
Oracle
LI Attribute and Perameter
==========================
List item
List item
List item
---------------------------------------------------
HTML Description Lists
======================
HTML also supports description lists.
A description list is a list of terms, with a description of each term.
The
tag defines the description list, the
tag defines the term (name), and the
tag describes each term:
----------------------------------------------------------
Marquee
=======
IT IS CONTAINER TAG
behavior slide,scroll,alternate
loop any number
bgcolor color name or Hexadecimal code
scrollamount any number
width pix
height pix
direction left,right,up,down
MouseControl onmouseenter,onmouseout,
onmousemove,onmousedown,onmouseup
behavior