P. 1
Basics of HTML

Basics of HTML

|Views: 2|Likes:
Published by Kashif Hussain

More info:

Published by: Kashif Hussain on Jul 25, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

05/13/2014

pdf

text

original

Markup languages and the Web, Web designing using HTML, CSS and Java Scripting

HTML is case independent. A tag is a special letter or key word enclosed in angular brackets. of tags and attributes. One can see the source code of an HTML page using the option View Source   .Hypertext markup language  Web documents are defined by the Hypertext Markup Language (HTML). Attributes are those specific words/letters prescribed for certain tags having certain possible values. style or format. Depending upon which tag is used the enclosed content can then have a specific effect. It is a language of tags. It has a fixed no. The browser has the capability of reading/interpreting each tag and its attributes used in a code and can show the result accordingly. Most tags have their corresponding closing tags represented by the same special letter or key word enclosed in angular brackets but preceded by a slash (/).

) is contained within a pair of <body> tag. Here is the example of a simple HTML document: <HTML> <HEAD> <TITLE> My first page</TITLE> . images. A <Head> tag can also be used before the body tag to provide title and other information about the web page.Hypertext markup language     An HTML document starts with <HTML> tag which has its closing tag. lists. buttons etc. The entire text work (including tables.

Hypertext markup language      </HEAD> <BODY> A simple page with just this sentence </BODY> </HTML> .

Hypertext markup language .

One can also use Left or Right as values for the attribute „align‟. <br> tag is used to provide a line break. <p Align=“Center”>Education provides a better understanding of life</p> the enclosed sentence would accordingly be displayed in the center of the screen due to attribute align and its value „center‟. . -<center>Education provides a better understanding of life </center> would align the enclosed text in the center.Text formatting  Paragraph tag <p> can be used for text formatting e.g.

<i> and </i> are used for italic text. . <u> and </u> are used of underlined text. <small> and </small> for smaller font size. <big> and </big> for bigger font size.Text formatting      <b> and </b> are used for bold text.

„Size‟. „face‟ and „color‟ are its attributes. This is some <b><i>bold text</i></b></p> <p><font face=“Arial”>This text is in the Arial font.</font> </BODY> </HTML> .Font tag          Font tag defines various font properties. Attributes can be used simultaneously in a tag as you can see below: <font size=5 color=red face=Arial>internet and ecommerce</font> Example code <HTML> <HEAD></HEAD> <BODY> <H1>This is my main title</H1> <p>Here is the first paragraph.

Font tag .

Their syntax is given below: <H1> Level 1 – largest text </H1> <H2> Level 2 </H2> <H3> Level 3 </H3> <H4> Level 4 </H4> <H5> Level 5 </H5> <H6> Level 6 – smallest text </H6> .Heading in HTML        Six different levels of headings can be created in HTML.

html 4 Start up a browser 5 Open up your file 6 File menu -> Open 7 Browse to find your file 8 Click open and OK 9 To make changes go back to the text editor 10 Make your changes and SAVE 11 Go back to the browser 12 Reload – use „Refresh‟ icon or „Refresh‟ button in the View menu or F5  .Creating basic HTML For creating/viewing a web page take the following steps: 1 Open a text editor like Notepad or WordPad 2 Type away 3 Save as a “text” file and call it filename .

List in HTML            <UL> and </UL> are used to create unordered list. <OL> and </OL> are used to create the ordered list. Use <LI> and </LI> tags in between as shown below: <HTML><Body> <UL> <LI>Item1</LI> <LI>Item2</LI> <LI>Item3</LI> </UL><P> <OL> <LI>Item1</LI> <LI>Item2</LI> <LI>Item3</LI> </OL> <P> <hr width=50% size=5 Align= center noshade></Body></HTML> .

List in HTML .

) uppercase letters (A. disc or circle type of bullets. <UL Type=“Square”>Square</UL>.List in HTML   Note that <hr> tag is used to create a horizontal line.You can also use lowercase letters (a.2.ii.3…...B. Width.) and large Roman numerals (I. You can also use square. In case of ordered list the default list is in the format 1. e.g. align and no shade are its attributes. size.) small Roman numerals (i. <hr> and <br> tags do not have corresponding closing tag.g.) in the ordered list e. <OL Type=“a”><LI>First></LI><LI>second</LI></OL> ..b..II.

Also.gif”> </Body></HTML> . use <img> tag.Applying images in HTML     To apply an image in html. Browser would display the image corresponding to the place where you have used the image tag in your code. use attribute „src‟ and keep the name of the image file as its value. See the following example code: <HTML> <BODY> <HI>On Sale Cassettes</H1> <Img Src=“cassette.

Applying images in HTML .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->