HTML Syntax 1
HTML Syntax 1
Attributes Example:
<!DOCTYPE html>
<html>
<body bgcolor=” red”>
</body>
</html>
Entities Example
<!DOCTYPE html>
<html>
<body>
<h1>HTML Entity Example</h1>
<h2>The copyright sign: ©</h2>
<h2>The less-than sign: <</h2>
<h2>The greater-than sign: ></h2>
</body>
</html>
Basic HTML Tags
<!DOCTYPE html>
<html>
<head>
<title>Air Force School Avadi</title>
</head>
<body>
Hello, Welcome to Air Force School Avadi.
</body>
</html>
Meta Tag
Syntax:
<META NAME=" " CONTENT=" ">
Example:
<DOCTYPE html>
<HTML>
<HEAD>
<TITLE> BASICS ABOUT COMPUTER</TITLE>
<META NAME="AUTHOR" CONTENT="Ashwini">
<META NAME="Keyword" CONTENT="Computer, Input, Processes, Instruction">
<META NAME="Description" CONTENT="This web page gives basic information about
computers">
</HEAD>
<BODY>
Being a modern-day kid, you must have used, seen, or read about computers. This is because they are
an integral part of our everyday existence.
</BODY>
</HTML>
Paragraph Tag
Syntax
<P>…………………………………. </P>
Example
<DOCTYPE html>
<HTML>
<HEAD>
<TITLE> BASICS ABOUT COMPUTER</TITLE>
</HEAD>
<BODY>
<P>Being a modern-day kid you must have used, seen, or read about computers. This is because they
are an integral part of our everyday existence. Be it school, banks, shops, railway stations, hospital or
your own home, computers are present everywhere, making our work easier and faster for us. As they
are such integral parts of our lives, we must know what they are and how they function. </P>
<P>Let us start with defining the term computer formally. The literal meaning of computer is a device
that can calculate. However, modern computers can do a lot more than calculate. Computer is an
electronic device that receives input, stores or processes the input as per user instructions and provides
output in desired format.</P>
</BODY>
</HTML>
Break Tag
Syntax
<BR>
Example:
<DOCTYPE html>
<HTML>
<HEAD>
<TITLE> BREAK TAG</TITLE>
</HEAD>
<BODY>
<BR>BBBBBBBBBBBBBB<BR>CCCCCCCCCCCCC<BR>RRRRRRRRRRRRR
</BODY>
</HTML>
Blank Space & Comments:
Black Space:
Comments: <!-- -->
Example:
<!DOCTYPE html>
<html>
<head>
<title>Non-Breaking Space & Comments</title>
</head>
<body bgcolor=pink>
<p>What will you learn
today?</p>
<!-- nbsp is an entity it can be added in a web page using the code -->
</body>
</html>
HR Tag:
Syntax: <HR>
Example:
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE> HR TAG</TITLE>
</HEAD>
<BODY>
<center><P>Hello, Welcome</p></center>
<HR SIZE="20" width="800" color="blue">
</BODY>
</HTML>
Marquee Tag
Syntax:
<marquee> </marquee>
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
<h3> <center>marquee Tag </center> </h3>
</head>
<body>
<marquee>hello</marquee>
<marquee bgcolor="pink" height=100" width="300" direction="up" loop="5" Scrollamount=70>
Hello welcome to airforce school </marquee>
</body>
</html>
Heading Tag Example with Syntax:
<!DOCTYPE html>
<html>
<body>
<center>
<h1>Asia</h1></center>
<h2>India</h2>
<h3>Tamil Nadu</h3>
<h4>Chennai</h4>
<h5>Avadi</h5>
<h6>Muthapudupet</h6>
</body>
</html>
Align Attribute:
<!DOCTYPE html>
<html>
<head>
<title>HTML Alignment Tag</title>
</head>
<body>
<H3 align=right>Welcome to AirForce School</H3>
<H3 align=left>Welcome to AirForce School</H3>
<H3 align=center>Welcome to AirForce School</H3>
</body> </html>
Font Tag Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML Alignment Tag</title>
</head>
<body>
<br>
<p><Font face="Broadway,Times new roman" size="4" color="red">Computer
Science.</font></p>
<br>
</body>
</html>