Hyper Text Markup Language: U. Rangith Instructor Vocational Training Center Vocational Training Authority of Sri Lanka
Hyper Text Markup Language: U. Rangith Instructor Vocational Training Center Vocational Training Authority of Sri Lanka
U. Rangith.dip.ict
Instructor
Vocational Training Center
Vocational Training Authority of Sri Lanka
1
HTML
210.211.217.253
210.211.217.43
2
Introduction to HTML
HTML Tools
EDITOR
The editor means the user write the program [HTML] in the notepad with extension htm or
html. When execute these files all source which means the instructions given by user to
convert ASCII language. (American Standard Code for Information Interchange)
File (htm/html)
APPLE 1011010
Compilers 1011101
Source Binary
3
Compiler
A compiler it converts source language [human language] into machine language, which
means human does not understand, but machine can understand.
Interpreter
Binary Language convert source to the human readable format.
Browsers
Web browser, a software application used to locate and display Web pages. The two most
popular browsers are Microsoft Internet Explorer and Firefox. Both of these are a graphical
browser, which means that they can display graphics as well as text; In addition, most
modern browsers can present multimedia information, including sound and video, though
they require plug-ins for some formats.
Html Tags
HTML Tags are used to markup...
HTML Elements
HTML Tags are surrounded by the 2 characters < and >[Less Than & Grater Than]
The surrounding characters are called Angle Brackets.
< Start, > End
HTML Tags are not case sensitive
4
I. Protocol [Eg: HTTP] (Hyper Text Transfer Protocol)
II. Domain Name [Eg: .Com, .lk, .Org]
III. Port Address – IP Address
IV. Directory Path
V. Object of File Name
VI. Internal Links Anchor
HTML Tag
A command inserted in a document that specifies how the document, or a portion of the
document, should be formatted. Tags are used by all format specifications that store
documents as text files.
• Empty Tags
• Pair Tags
Pair Tags
The Pair Tags means has two tags,
1. Start Tag <html>
2. End Tag </html>
Remarks1:
HTML command has mostly pair tags
<Html>..........</Html>
Empty Tag
Empty Tag that not effect HTML Program
<Hr>, <Br>
Remarks2:
Container tag or Pair Tag, which is having a pair Tag is called container tag, with out a pair
tag the html statement could not execute. Almost all the tags may have pair tags.
5
HTML Divided Two Section
1. Head Section
2. Body Section
Head Section
<Head><Title>......................</Title></Head>
Head Tags, The Head of and HTML documents which hold information about your document
such as Title containing with these two tags.
Title Tag
The Name of the Program, it has general format.
<Title> ........Text......</Title>
<Html>
<Head>
<Title>.....1st Html Program </Title>
</Head>
Body
The Body Elements encloses the main content of the document including heading paragraph
list table and images.
<Body>..............Bodyof Html.............</Body>
After that you can see browser symbol in the particular location, if you click you will get very
nice Html Program.
First.html
6
Underline Tag
<U>.....Text......</U>
Bold Tag
<B>.....Text......</B>
Italic Tag
<I>......Text......</I>
Superscript Tag
<Sup>....Text.....</Sup>➔ 2 <Sup> nd </Sup>➔2nd
Subscript Tag
<Sub>....Text....</Sub>➔ H <Sub> 2 </Sub> O ➔H20
Heading Tags
<H1>.......Text............</H1>
<H2>.......Text............</H2>
<H3>.......Text............</H3>
<H4>.......Text............</H4>
<H5>.......Text............</H5>
<H6>.......Text............</H6>
Center Tag
<Center>.......Text............</Center>
7
Color System In Html
Standard Colors
Standard Colors are 16 available Black, Silver, Grey, White, Maroon,
Red, Purple, Fuchsia, Green, Lime, Olive, Yellow, Blue, Teal,
Navy, and Aqua.
Hexadecimal Colors
A hexadecimal color has syntax, 256 colors.
Color = [Red, Green, Blue] ➔ Its Call RGB
Background Picture
When the HTML program write in the notepad, and when the user called background
picture and the picture and html files are should save in same location.
8
JPEG Join Photo Export Group
It supportsTwo file extension, JPEG and BMP[Bitmap]
Horizontal Tag
<hr>
The Hr element Its for create a Line as Horizontal wise,
its an Empty Tag
Comment Tag
The Comment Tag is used to easy to understand the particular text, but it’s not appear in
the browser,soit’s for understand a program to users.
Big Tag
<Big>......Text / Contents.......</Big>
It’s mean enlarge Tag; it’s enlarge the content between these Tag.
Small Tag
<Small>........Text / Content.........</Small>
It’s mean Zoom Out the content between these Tags.
9
KBD Tag
This Tagchanges the contents between these tags as font style
<KDB>.......Text.......</KDB>
Pre Tag
It’s mean by Preformatted.
<Pre>......Text...........</Pre>
P Tag
P Tag is used to align a paragraph and to modify the paragraph.
Attributes of P Tag
<P
Align= “Left” / “Right”/ “Center” / “Justify”>…Paragraph….
List Tag
The List Tag has 06 categories, there are;
• Unordered List (UL)
• Order List (OL)
• Directory List (Dir)
• Menu List (Menu)
• Definition List
• Address List
Unordered List
Syntax
<UL
Type = “Disc” / “Circle”/ “Square”>
<LI>……Text 01……..</LI>
<LI>……Text 02……..</LI>
<LI>……Text 03……..</LI>
</UL>
10
Order List | Syntax
<OL
Type = “1” / “A” / “a” / “I” / “I”>
<LI>……Text 01……..</LI>
<LI>……Text 02……..</LI>
<LI>……Text 03……..</LI>
</OL>
Directory List
Syntax
<Dir>
<LI>………Text…………</LI>
<LI>………Text…………</LI>
<LI>………Text…………</LI>
</Dir>
Remarks 1
The Above dir function apply the web browser you create
the disc bellow 20
Remarks 2
In Unordered List without type value automatically or
default the disc bullet appears on the web browser.
Menu List
This Also similar like to Dir List.
Frameset
Frameset is a Pair Tag and we can use the frameset to divide the webpage in horizontal or
vertical wise.A Frameset Tag has two Attributes. The syntax of Frameset Tag.
<Html>
<Head><Title> Frameset Testing </Title></Head>
<Frameset>
</Frameset>
<Body>
<Html>
iframe Syntax
<html>
<Body>
</Body>
</html>
Paragraph Tag
<html>
<Body>
<p>I am normal</p>
<p style="color: #145856;"> I am red </p>
<p style="color:blue;"> I am blue </p>
<p style="font-size:36px;"> I am big </p>
</Body>
</html>
12
<P> Paragraph Tag
A paragraph is marked up as follows:
<p> This is some text in a paragraph. </p>
Attribute Value Description
Pre Tag
<Pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
Progress Tag
<html>
<Body>
Downloading progress:
<progress value="22" max="100">
</progress>
Video Tag
<Body>
Modification of Table
<Body>
<table align = "Center" border= "1" bordercolor = "Red" bgcolor = "Navy" Width = "200"
Height = "200" >
<Tr>
<Th></Th>
<Th></Th>
</Tr>
<Tr>
<Td>D</Td>
<Td></Td>
</Tr>
</table>
</Body>
</Body>
<Legend> Tag
<Body>
<form>
<fieldset>
<legend> ICTT Students </legend>
Name: <input type="text" size="30"><br><br>
Email: <input type="text" size="30"><br>
</fieldset>
</form>
</Body>
<OPTGroup>
<Body>
<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
</Body>
<Object> Tag
<html>
<Body>
<object width="400" height="400"
data="helloworld.swf">
</object>
</Body>
15
<Mark> Tag
<Body>
<p>Do not forget to buy <mark> Rocky </mark> today. </p>
<p><strong>Note:</strong>The mark tag is not supported in Internet Explorer 8 and earlier
versions.</p>
</Body>
<Figure> Tag
<Body>
<p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the
Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25
metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in
Norway.</p>
<figure>
<img src="img_pulpit.jpg" width="304" height="228">
<figcaption>Fig.1 - A view of the pulpit rock in Norway.</figcaption>
</figure>
</Body>
<Datalist> Tag
<form action="/action_page.php" method="get">
<input list="browsers" name="browser">
<Datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</Datalist>
<input type="submit">
</form>
16
<Button> Tag
<Body>
<button type="button" onclick="alert('Hello
world!')">Click Me!
</button>
</Body>
<Address> Tag
<Body>
<Address>
Written by : Rocky Rangith <Br>
Visit us at: www.facebook.com/Rockyrangith<br>
Old Park Road <Br>
Wasington DC<Br>
USA.
</Address>
</Body>
<Abbr> Tag
<Body>
</Body>
<Comment> Tag
<Body>
<Dir> Tag
<Body>
<Dir>
<Li>html</Li>
<Li>xhtml</Li>
<Li>css</Li>
</Dir>
</Body>
17
<Font> Tag
<Body>
<Font>Your Text Here</Font>
</Body>
<Details> Tag
<Body>
<Details>
<Summary> My Family </Summary>
<P> I have one Brother and one Sister. They all are very nice </P>
<p>I love my family soo much</p>
</Details>
</Body>
<Audio> Tag
<Body>
<Audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
</Audio>
</Body>
18