You are on page 1of 10

1

(a)

HTML Basic

Theory: Describe About HTML

.

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

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

Often italized by browsers. HTML uses elements like <b> and <i> for formatting output. </CITE> 1. like bold or italic text. 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 . you learned about HTML styling. (c) Theory HTML Formatting Elements In the previous chapter. Often displayed in italics or underlined.Often displayed in a Courier font or a similiar font that allots the same width to each character. HTML also defines special elements. <VAR> Indicates a variable. </VAR> <CITE> Indicates short quotes or citations. using the HTML style attribute. 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 .

.

Code: <html> <head><title>MyClassTimeTable</title> <link rel="stylesheet" type="text/css" href="stylefortimetable. Whitespaces inside this element are displayed as typed. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file.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 Third OSS OSS OSS WebTech OSS OSS Third OSS OSS OSS WebTech OSS OSS .Pre tag: Theory: The HTML <pre> element (or HTML Preformatted Text) represents preformatted text.

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

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