HTML Presentation
HTML Presentation
Softsmith Infotech
HTML
Introduction Creation Tags Text List Image Background Link Table Frames Forms
Softsmith Infotech
Introduction
SGML Standard Generalized Markup Language (1986) Mother of HTML and XML Describing document types in many field of human activity (clinical records to musical notations) Used in Aerospace, Defense, Semiconductor and Publishing industries
Softsmith Infotech
SGML - Barriers
Lack of widely supported style sheets Complex and unstable software Obstacles to interchange SGML data SGML renamed as Sounds Good, May be Later.
Softsmith Infotech
HTML
Hyper Text Markup Language
Hypertext Dealing with links Markup Designing documents with some styles or lay outs
Softsmith Infotech
HTML Creation
Use Notepad or any text editor Type contents and save with a .htm or .html extension Eg. MyPage.html FrontPage, MS Word allows us to create web pages without any prior knowledge in HTML. Just save as web page and you will get the effect.
Softsmith Infotech
Softsmith Infotech
TAGS
Instructs the browser to do some operation. Pillar of HTML Start Tag and End Tag
<Start TAG> </End TAG>
Few examples:
<BODY>, <HTML> etc
Adding Text
Anything that we type between the tags <BODY> and </BODY> will appear on the browser. Many formatting tags are available.
Softsmith Infotech
Text Formatting
<BASEFONT>, <FONT>, <B>, <I>, <U>, <BR>, <STRONG>, <EM>, <SUB>, <SUPER>, <BLINK>, <STRIKE>, <Hx>
x = 1 to 6 (1 being the largest and 6 being the smallest) <BLINK> works only in netscape.
<BIG>, <SMALL>
Softsmith Infotech
Text Layout
<CENTER> <DIV> (same as <P>) <P>
<P ALIGN = > </P>
Right Left Center Justify
Softsmith Infotech
HTML Lists
Ordered List
<OL TYPE = circle><OL> TYPE can be circle or square or disc If TYPE is left, by default we have Numbers. TYPE can also take values like A, a, i, I We can configure the numbering to start from a particular value with the help of start attribute.
Unordered list
<UL TYPE=circle></UL> TYPE can be circle or square or disc
Softsmith Infotech
Images
JPEG or GIF images are recognized by browsers <IMG> tag will place image on your page The attribute SRC, tells the location from which the image is to be taken We can control size of the image (width and height attributes) The attribute ALT will say the text to be displayed in the place of image, if image not found.
Softsmith Infotech
Images
The attribute BORDER specifies the thickness of border around the image. Hspace and Vspace attributes allows us to add space to the left-right sides and topbottom sides Aligning images is also possible with the align property
Softsmith Infotech
Hyperlink
<A> - Anchor tag Its attribute HREF will be the page to which we will be redirected. <A HREF=Second.html>Click Here</A> Click Here will appear in the browser like this
Click Here
Softsmith Infotech
Softsmith Infotech
Softsmith Infotech
Link Target
By default, links will open in the current window We can specify values for the Target attribute to change this behaviour.
_blank new window _self same window _parent frame superior to the frame where the hyperlink is in _top Cancels all frame and loads in new window.
We can specify the name of the frame where the link need to be opened.
Softsmith Infotech
Internal Link
To create a link with in that page, add a name attribute to the anchor tag and specify that name from the place where you want that navigation
<a name="chapter1">Some contents</a> Click <a href="#chapter1">here</a> to read chapter 1.
Softsmith Infotech
Link to Email
<a href="mailto:[email protected]">Email Me</a> This will appear in the page as
Email Me
When we click that, we can compose mail and send it to that address. We can even configure subject and body of the mail using the attributes subject and body.
Softsmith Infotech
Image Map
Helps us to use one image to navigate to multiple pages.
<img src="rainbow.gif" usemap = #example border=0> <map name=example> <area shape=Rect Coords=0,0,29,29 Href="http://www.yahoo.com"> <area shape=Rect Coords=30,30,59,59 Href="http://www.hotbot.com"> </map>
Softsmith Infotech
Backgrounds
For setting background of our page, we need to specify some properties in <BODY> tag. BACKGROUND BGCOLOR BGSOUND BGPROPERTIES
Softsmith Infotech
Tables
Help in arranging elements in our page in a neat way Divide page into separate sections Creating Menus Adding form fields Alignment of images
Softsmith Infotech
Table Creation
Table - <TABLE> </TABLE> Row - <TR> </TR> Column - <TD> </TD>
<TABLE BORDER=0> <TR> <TD> 1 </TD> <TD> 2 </TD> </TR> </TABLE>
Softsmith Infotech
1 2
Table Attributes
Align left, right, center Valign top or bottom Background Bgcolor Border Bordercolor Bordercolordark - shadow Cellpadding Cellspacing Nowrap protects from line break Frame deals with border adjustment void, above, below, lhs, rhs, hsides, vsides, box Width
Softsmith Infotech
Only for TD
Rowspan Merging rows Colspan Merging columns nowrap
Softsmith Infotech
Frames
Divides screen into separate areas Each frame can contain a HTML document <frameset> tag is used to create a frame. Ended with </frameset> tag Attributes
Cols Rows
Softsmith Infotech
HTML Forms
Most widely used in web applications Has several elements Created with in <BODY> Use <FORM> </FORM> tags to define elements of form Attributes
Action URL to be navigated on submit Method GET or POST
Softsmith Infotech
Form Fields
Text Password Hidden Text area Submit button Cancel button Image button Check box Radio button Drop down menu
Softsmith Infotech
Text Area
<textarea cols=20 rows=20 name=txtarea>Text area</textarea> Cols and rows specifies how many columns and rows will the text are occupy on our page. Name Program will use this name to refer to the element Tabindex and wrap are other properties
Tabindex order of tab focus Wrap
Off no line breaks Virtual for appearance Infotech Softsmith line breaks will be there Physical Exact replica of what we type
Check box
<input type="checkbox" name="option1" value=" Java "> Java<br> <input type="checkbox" name="option2" value=" Oracle " checked> Oracle <br> <input type="checkbox" name="option3" value=" Net "> .Net <br> For Radio button, the type need to be given as radio
Softsmith Infotech
Dropdown List
Using Select tag we can define dropdown menu Select tag has attributes like
Name Size Multiple
Softsmith Infotech
Special Characters
  © > <
Softsmith Infotech
HTML Comments
Starts with
<!- -
Ends with
- ->
Softsmith Infotech
META Tag
<META> tag has information related to search engines and browsers Later its use was not recommended If page content and description doesnt match, search engines report that page as SPAM Based on the keywords, search engines search the keywords present in META tag of the page
Softsmith Infotech
Softsmith Infotech