HTML Basic Elements
HTML Basic Elements
programming language.
HTML was created by Sir Tim Berners Lee in
1991.
HTML5 is the latest version of HTML.
Writing HTML Documents
HTML document structure
Every HTML document should follow this
general form:
<HTML>
<HEAD><TITLE>Title of page is written
here.</TITLE></HEAD>
<BODY>The HTML tags that define your page
go here
</BODY>
</HTML>
BASIC HTML TAGS:
1.The HTML tag -This tag identifies the
document as an HTML document. An HTML
document begins with <HTML > and ends with
</HTML>.
Ex-<HTML>
</HTML>
Attributes of HTML tag are-
<HTML lang=en>
<HTML dir=ltr or rtl>
<HEAD>
<META charset-”utf-8”/>
<HEAD>
3.The TITLE tag(Document Title)
Type-Container Element
Function-It defines the document title
Contains-Plain text
Used Inside-Head tag
Ex-
<HEAD>
<TITLE>…</TITLE>
</HEAD>
4.The BODY Tag(Document Body)
Type-Container Element
Function-Defines the document’s body
Attributes-
Background,Bgcolor,Text,Alink,Vlink,Topmargi
n,Leftmargin
Contains-Body context i.e.all tags that controls
the appearance of the body of the web page.
Such as text, images,lists,tables,hyperlinks etc.
Ex-<BODY>……….</BODY>
Ex-To display the web page title as “my first
HTML page”
<HTML lang=en>
<HEAD>
<META charset-”utf-8/”>
<TITLE>My First Web Page</TITLE>
</HEAD>
<BODY>
Hello! Welcome here.
</BODY>
</HTML>