Professional Documents
Culture Documents
Web Tech Handout
Web Tech Handout
COMPILED BY:
MUSA ABUBAKAR
DESCRIPTION
The <HTML> tag is the opening tag that tells the browser this is a web page written in HTML. HTML is case insensitive
therefore <HTML> and <html>,<Html>,<hTmL> are all the same.
What ever is written between <HEAD> and </HEAD> will not be displayed in the content of the browser but could be
displayed in the title bar.
The title of the web page will be written in between <TITLE>and </TITLE> which will be displayed in the title bar
Anything written in between the <BODY> and </BODY> will be displayed in the content of the browser.
</HTML> tag mark the end of the HTML code
Note: <HTML> is the opening tag while </HTML> is the closing tag
<HEAD> is the opening tag while </HEAD> is the closing tag
<TITLE> is the opening tag while </TITLE> is the closing tag
<BODY> is the opening tag while </BODY> is the closing tag
Save your web page with a name home.html ,each and every HTML document must be save with the page name.html
that is extension of the document [pagename.html].
You can save the web page in side any folder or on desktop, but in this tutorial we are going save it on desktop.
OUTPUT
Text Formatting
You can format the text in html using <font>tag that is increasing the size of the text the color e.t.c
Example: <font size=”+2”>your text here</font>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<font size="+4">WELCOME TO ND2 COMPUTER SCIENCE</font>
</body>
</html>
OUTPUT
To change the color of the text we add color attribute inside the <font> tag
<font size=”+2” color=”red”>your text here</font>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<font size=""+4" color="red">WELCOME TO ND2 COMPUTER SCIENCE</font>
</body>
</html>
Making the text to be bold we add <b> and close it with </b>
Example: <font size=”+2”><b>your text here</b></font>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<font size="+4" color="red"><b>WELCOME TO ND2 COMPUTER SCIENCE</b></font>
</body>
</html>
OUTPUT
Let’s add subtitle after the above title, <p> tag is use to move to next line with a space between the present line and
the next line.
Let’s try something simple below:
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<font size="+4" color="red"><b><i><center>WELCOME TO ND2 COMPUTER SCIENCE</center></i></b></font>
<p>
<font size="+2" color="blue"><center>this website has been created by nd2 computer science AGP</center></font>
</body>
</html>
The background color of the webpage can be change inside the <body> tag
Example: <body bgcolor=”pink”>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body bgcolor="pink">
<font size="+4" color="red"><b><i><center>WELCOME TO ND2 COMPUTER SCIENCE</center></i></b></font>
<p>
<font size="+2" color="blue"><center>this website has been created by nd2 computer science AGP</center></font>
</body>
</html>
OUTPUT
</body>
</html>
OUTPUT
Let’s add a texts after the above title, <br> tag is use to move to next line with no space between the present line and
the next line.
Let’s try something simple below:
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body bgcolor="pink">
<font size="+4" color="red"><b><i><center>WELCOME TO ND2 COMPUTER SCIENCE</center></i></b></font>
<p>
<font size="+2" color="blue"><center>this website has been created by nd2 computer science AGP</center></font>
<p>
<b>definition of computer:</b>
<br>
computer is an electronic device that is capable of accepting data as input, process the data and produce accurate
result as output.
</body>
</html>
HTML LIST
We have two types of list in html. Ordered list and unordered list
<ol> is a starting tag of ordered list and </ol> is the ending or closing tag of ordered list.
Ordered list means a list that is in order e.g.1,2,3 or a,b,c and I,ii,ii they are all ordered list.
<li> is a tag inserting the list item, each element in the list must be written before <li> tag example:
<ol>
<li>item1
<li>item2
</ol>
Try the source code below
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body bgcolor="pink">
<font size="+4" color="red"><b><i><center>WELCOME TO ND2 COMPUTER SCIENCE</center></i></b></font>
<p>
<font size="+2" color="blue"><center>this website has been created by nd2 computer science AGP</center></font>
<p>
<b>definition of computer:</b>
<br>
computer is a elecronic device that is capable of accepting data as input, process the data and produce accurate result
as output.
<p>
<b>types of computer:</b>
<ol>
<li>digital computer
<li>analog computer
<li>hybrid computer
</ol>
</body>
</html>
<ul> is a starting tag of unordered list and </ul> is the ending or closing tag of unordered list.
unordered list means a list that is not in order, usually use bullets.
<li> is a tag inserting the list item, each element in the list must be written before <li> tag example:
<ul>
<li>item1
<li>item2
</ul>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body bgcolor="pink">
<font size="+4" color="red"><b><i><center>WELCOME TO ND2 COMPUTER SCIENCE</center></i></b></font>
<p>
<font size=""+2" color="blue"><center>this website has been created by nd2 computer science AGP</center></font>
<p>
<b>definition of computer:</b>
<br>
computer is a elecronic device that is capable of accepting data as input, process the data and produce accurate result
as output.
<p>
<b>types of computer:</b>
<ol>
<li>digital computer
<li>analog computer
<li>hybrid computer
</ol>
<br>
<b>characteristics of computer:</b>
<ul>
<li>speed
<li>accuracy
<li>storage
</ul>
</body>
</html>
HTML TABLE
<table> is the starting tag of the table and </table> is the ending tag of the table
<tr> is the starting tag of the table row and </tr> is the ending of the table row
<td> is the the starting tag of the table data and </td> is the ending tag of of the table data.
Note: adding more <td> and </td> in between <tr> and </tr> will add more columns to the table.
SOURCE CODE
<html>
<head>
<title>result</title>
</head>
<body>
<table border="+2">
<tr>
<td>NAME</td><td>REG NO</td><td>CA</td><td>EXAM</td><td>TOTAL</td>
</tr>
</table>
</body>
</html>
OUTPUT
To add more rows <tr> and </tr> will be added with <td> and </td> in side in order to add more columns
SOURCE CODE
<html>
<head>
<title>result</title>
</head>
<body>
<table border="+2">
<tr>
<td>NAME</td><td>REG NO</td><td>CA</td><td>EXAM</td><td>TOTAL</td>
</tr>
<tr>
<td>sani musa</td><td>001</td><td>30</td><td>40</td><td>70</td>
</tr>
<tr>
<td>dahiru magami</td><td>002</td><td>35</td><td>40</td><td>75</td>
</tr>
</table>
</body>
</html>
SOURCE CODE
<html>
<head>
<title>result</title>
</head>
<body>
<table border="+2">
<tr>
<td>NAME</td><td>REG NO</td><td>CA</td><td>EXAM</td><td>TOTAL</td>
</tr>
<tr>
<td>sani musa</td><td>001</td><td>30</td><td>40</td><td>70</td>
</tr>
<tr>
<td>dahiru magami</td><td>002</td><td>35</td><td>40</td><td>75</td>
</tr>
<tr>
<td>abdulhakeem abiola</td><td>003</td><td>35</td><td>50</td><td>85</td>
</tr>
<tr>
<td>musa abubakar</td><td>004</td><td>35</td><td>45</td><td>80</td>
</tr>
</table>
</body>
</html>
SOURCE CODE
<html>
<head>
<title>result</title>
</head>
<body>
<table border="+2" align="right">
<tr>
<td>NAME</td><td>REG NO</td><td>CA</td><td>EXAM</td><td>TOTAL</td>
</tr>
<tr>
<td>sani musa</td><td>001</td><td>30</td><td>40</td><td>70</td>
</tr>
<tr>
<td>dahiru magami</td><td>002</td><td>35</td><td>40</td><td>75</td>
</tr>
<tr>
<td>abdulhakeem abiola</td><td>003</td><td>35</td><td>50</td><td>85</td>
</tr>
<tr>
<td>musa abubakar</td><td>004</td><td>35</td><td>45</td><td>80</td>
</tr>
</table>
</body>
</html>
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<video src="jok.mp4" controls="controls">
</body>
</html>
The same thing with the audio file but the format or extension is .mp3
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
<audio src="craig.mp3" controls="controls">
</body>
</html>
Tip: craig is the name of the file while .mp3 is the format of the audio.
OUTPUT
How to create hyperlink i.e linking different webpages with one another
SOURCE CODE
<html>
<head>
<title>login</title>
</head>
<body>
<a href="home.html">home</a>
</body>
</html>
OUTPUT
SOURCE CODE
<html>
<head>
<title>ND2 WEBSITE</title>
</head>
<body>
</body>
</html>
</body>
</html>
</body>
</html>
OUTPUT
return true
}
else if (username=="musa" && password=="thinker"){
alert("you are welcome")
return true
}
else{
alert('invalid Username Or Password')
return false
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="home.html" onsubmit="return check_input();">
username:<input type="text" name="username">
<br>
password:<input type="text" name="password">
<br>
<input type="submit" value="login" name="login">
</form>
</body>
</html>
Description of some HTML tags
Tag Description
<b> bold
<i> italic
<u> underline
<p> paragraph
<br> break
<tr> Table row
<td> Table data
<th> Table Header
<ol> Ordered list
<ul> Unordered list
musaabubakartm@gmail.com, 08107072658 Page 22
<li> List item
HTML Colors
Colors are displayed combining RED, GREEN, and BLUE light sources.
Color Values
HTML colors can be defined as a hexadecimal notation for the combination of Red, Green,
and Blue color values (RGB).
The lowest value that can be given to one light source is 0 (hex
#00) and the highest value is 255 (hex #FF).
The table below shows the result of combining Red, Green, and Blue light sources:.