You are on page 1of 11

Web Tech Practicals

By

Sanjeev Pokharel

MScIT III Semester
SMU India
[Learning Center, LBEF, CPS Maitidevi, Kathmandu]

1 (a) HTML Basic Theory: Describe About HTML Prepared By/Solved By: Sanjeev Pokharel .

Prepared By/Solved By: Sanjeev Pokharel .

</TT> Prepared By/Solved By: Sanjeev Pokharel . </B> <I> Indicates that the text should be italic. The syntax or format for using a PHYSICAL TAG is as follows: <Tag Name> Characters to be formatted. </I> <TT> Indicates that the text should be used with a font such as Courier that allots the same width to each character.1 (b) aa Physical Tags Physical tags are used to indicate exactly how specific characters are to be formatted. </Tag Name> <B> Indicates that the text should be bold.

0 or higher. </U> Logical Tags Logical tags are used to indicate to the visually impaired that there is some emphasizes on the text. in a smaller font if possible. </SUP> <U> Indicates that the text should be displayed underlined. Usually displayed in a Courier font or a similiar font that allots the same width to each character. Usually displayed in a bold font </STRONG> <CODE> Indicates a sample of code. </Tag Name> Examples of Logical Character Tags <EM> Indicates that characters should be emphasized in some way.0 or higher. Available in HTML 3.0 or higher. </KBD> Prepared By/Solved By: Sanjeev Pokharel . </CODE> <KBD> Used to offset text that the user should enter. </BIG> <SMALL> Indicates that the text should be displayed in a small font.0 or higher. </SMALL> <SUB> Indicates that the text should be displayed as a subscript. Usually displayed in italics. Each browser has its own technique as to how to indicate to its viewer that the text between the tags are different. Available in HTML 3. </EM> <STRONG> Emphasizes characters more strongly than <EM>. The syntax or format for using a LOGICAL TAG is as follows: <Tag Name> Character/s to be formatted. Available in HTML 3.<BIG> Indicates that the text should be displayed in a big font. in a smaller font if possible. </SUB> <SUP> Indicates that the text should be displayed as a superscript. Available in HTML 3. Not all browsers support this tag.

like bold or italic text. </CITE> 1. Often italized by browsers.Often displayed in a Courier font or a similiar font that allots the same width to each character. HTML uses elements like <b> and <i> for formatting output. <VAR> Indicates a variable. HTML also defines special elements. Often displayed in italics or underlined. using the HTML style attribute. </VAR> <CITE> Indicates short quotes or citations. (c) Theory HTML Formatting Elements In the previous chapter. Formatting elements were designed to display special types of text:  Bold text  Important text  Italic text  Emphasized text  Marked text  Small text  Deleted text  Inserted text Prepared By/Solved By: Sanjeev Pokharel . you learned about HTML styling. for defining text with a special meaning.

 Subscripts  Superscripts Tag Description <b> Defines bold text <em> Defines emphasized text <i> Defines italic text <small> Defines smaller text <strong> Defines important text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text <mark> Defines marked/highlighted text Prepared By/Solved By: Sanjeev Pokharel .

Prepared By/Solved By: Sanjeev Pokharel .

Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file.Pre tag: Theory: The HTML <pre> element (or HTML Preformatted Text) represents preformatted text.css"> </head> <body> <pre> MyClassTimeTable Days First Sunday HSN Monday HSN Tueday HSN Wedenesday HSN Thursday WebTech Fridaty HSN </pre> </body> </html> Second WebTech WebTech WebTech WebTech OOAD WebTech Output: MyClassTimeTable Days Sunday Monday Tueday Wedenesday Thursday Fridaty First HSN HSN HSN HSN WebTech HSN Second WebTech WebTech WebTech WebTech OOAD WebTech Prepared By/Solved By: Sanjeev Pokharel Third OSS OSS OSS WebTech OSS OSS Third OSS OSS OSS WebTech OSS OSS . Code: <html> <head><title>MyClassTimeTable</title> <link rel="stylesheet" type="text/css" href="stylefortimetable. Whitespaces inside this element are displayed as typed.

and when it is set to 50. Intradocument linking is linking to a location on the same page and to specific locations on another web page. Theory: HSPACE has the most pronounced effect when it is used in conjunction with ALIGN to right or left align the image.Syntax In HTML. HTML links are hyperlinks. Prepared By/Solved By: Sanjeev Pokharel .w3schools. HSPACE Example: <IMG SRC="pumpkin. The following examples show HSPACE when it is not used. HTML Links . VSPACE sets the vertical space between the image and surrounding text.a.b.3 . <a href="http://www. A hyperlink is a text or an image you can click on. and jump to another document. links are defined with the <a> tag: <a href="url">link text</a> Eg.gif" ALT="picture of a pumpkin" HEIGHT=100 WIDTH=100 ALIGN=LEFT> Include Hspace="10" Vsapce="50" 4. sets the horizontal space between the image and surrounding text. when it is set to 10.b.com/html/">Visit our HTML tutorial</a> 4.

The name specified in the id is preceded by a pound sign in the href and must match exactly. The id can be added to any web page element that accepts global attributes. <a href="#destination"></a> <h1 id="destination">Heading Text</h1> The id attribute must be a unique value and can not contain spaces. Prepared By/Solved By: Sanjeev Pokharel . use an anchor tag and the id attribute.To link to a specific location on a web page.