HTML Formatting
·
<p>
This
tag is used to declare a paragraph.
<p
align=”left/right/center” > </p>
·
<pre>
It
declares the text as it is shown in notepad.
·
<text>
It works as
Pera tag.
·
<div>
This
tag is used to declare a specific division in the web page.
<body>
<b>Jai Siya Ram</b>
<i>Jai Siya Ram</i>
<div>
<b>Jai Siya
Ram</b>
</div>
<div>
<i>Jai Siya
Ram</i>
</div>
</body>
·
<br>
This
tag is used to break the running line.
·
<nobr>
It
defines no break for a running line.
·
<hr>
This
tag is used to draw a horizontal row.
Width
attribute works with it.
·
<center>
This
tag aligns the data to center.
·
<Font>
It
has three attributes
Face-defines
font family
Size-defines
size
Color-defines
color
(Note:
color can be used in hex form(RGB) )“#FF0000”.
·
<body>
Bgcolor-
defines background color
Background-
defines background image
Text-
defines default color of text
·
HTML List
Two
types of lists are used
1. Ordered
list
For
ordered list <ol> tag is used.
2. Unordered
list
For
Unordered list <ul> tag is used.
<Li>
is used to define any list item.
Attributes
used with list tags:
Type=”circle/square/disk” “1/a/A/i/I”
Start=”starting value (Always Integer)”
For Ex:
<ol
type=”i” start=”5”>
<li>abc</li>
<li>bcd</li>
<li>cde</li>
<ol>
<ul
type=”square”>
<li>abc</li>
<li>bcd</li>
<li>cde</li>
<ul>
·
HTML Image
<img
src=”Image path” height=”100% / 100px / 100” width=”100%” align=”r/c/l”
alt=”name” hspace=”20%/20px/20”vspace=”20%” title=”image title or name”/>
Note:
some special values are also used with align attribute in img tag.
<img
src=”” align=”texttop/abstop/absbottom/baseline”/>
·
<big>
This
tag is used to make fonts bold and big in size.
·
<small>
This
tag is used to make fonts small in size.
·
<strike>
This
tag is used to generate strike effect.
·
HTML heading
<h1>
text </h1>
<h2>
text </h2>
<h3>
text </h3>
<h4>
text </h4>
<h5>
text </h5>
<h6>
text </h6>
·
HTML
linking
For
linking <a> (Anchor) tag is used with attribute href.
<body>
<a href=”page or file name including
path which we want to link” Click
Here...
</a>
</body>
Note:
Target attribute is used with anchor tag to identify where to open particular
link.
<
a href=”whatever” target=”_self/_main _/perent/_top”>click here</a>
·
<Marquee>
<marquee
bgcolor=”” direction=”left/right/up/down” behaviour=”alternet/scrool/slide”
scrollamount=”” scrolldelay=”” height=”” width=””>Text Here</marquee>
Marquee
is used for moving text effect.
Scrollamount
and scrolldelay attributes are used to move text fast and slow respectively.
Assignment:
·
Write a program to generate the following output:
BCA 1st
Year
<HTML>
<BODY>
<font color=”#______”>B</font>
<font
color=”#______”>C</font>
<font
color=”#______”>A</font>
<font
color=”#______”>1<sup>st</sup></font>
<font color=”#______”>Year</font>
</BODY>
</HTML>
Note:
If need space we can use or <spacer size=”value”> tag
Pair of creates a single space.
·
Write a program which show five students names in
following manner:
1. Names
should be unformatted (Unordered manner) manner.
2. Names numbering
should be in numerical manner.
3. Names
numbering should be in roman manner and start from V.
1.
<HTML>
<BODY>
<ul>
<li>name1</li>
<li>name2</li>
<li>name3</li>
<li>name4</li>
<li>name5</li>
</ul>
</BODY>
</HTML>
2.
<HTML>
<BODY>
<ol>
<li>name1</li>
<li>name2</li>
<li>name3</li>
<li>name4</li>
<li>name5</li>
</ol>
</BODY>
</HTML>
3.
<HTML>
<BODY>
<ol type=”i” start=”5”>
<li>name1</li>
<li>name2</li>
<li>name3</li>
<li>name4</li>
<li>name5</li>
</ol>
</BODY>
</HTML>
·
Write a program which contains an image and the image
should appear in the center of the screen:
<HTML>
<BODY>
<img scr=”path of image”
hspace=”value” vspace=”value” height=”” width=””\>
</BODY>
</HTML>
0 comments:
Post a Comment