Unit-II - Web Technology
Unit-II - Web Technology
ltis the first paragraph.
Output It is the First Heading Tris the first paragraph 2.2 HTML tags Since HTML is a markup language, therefore, it uses certain tags for formatting the content. The tags are used with angle braces as intag provides a means to structure our text into different paragraphs, Each paragraph should write in between an opening
and a closing
tag as shown below in the example, Example: p> it breaks the current line with a trailing blank lineused to display the same text in our document as it is written in HTML seript, The font-width, their spaces, lines and tabs of our source document remain as is it, In simple words, the browser shows our test as we typed it in. Through monospace font, the text is rendered where the same amount of space is occupied by all characters, Visually, preformatted text looks like 3 courier font. This is an example of preformatted tag. Example:this is a preformatted text tag exampleOutput this isa preformotted text tag exomple 2.3.4 BOLDFACE, UNDERLINE AND ITALICS We can use bold, italic and underline , and tags respectively in HTML editor to highlight the text ina HTML document, The text in-between ~ tags text will be bold and similarly we can apply other to italic and underline. The HTML links do not require extra tag because these are already underlined. ‘The potential for confusion and the archaic nature of underlining in general make it a poor marker for emphasis.When using these tags. we usually cannot (and probably should not) have text that is both boldface and italics: the last tag encountered is usually the tag that is displayed. For example, if we had a boldface tag followed immediately by an italic tag, the tagged word would appear in italics. This is an example. Exampl boldfaceb> underline/u> Output: boldface underline italie 2.3.5 LISTS In HTML, we can give number, unnumbered and lists to the different text using the simple tags. We can also use nested lists with a list. HTML editor automatically takes the space between the bullet oF list number in a text, we do not need to mention it. Neither (as yet) do we have control over what type of bullet will be used as each browser is different. Unnumbered lists: tag is use to unnumbered any list followed by the actual list items, which are marked with the
. For example, here is an unnumbered list with three items: Example disc bullets:- tag. The list is ended with the ending tag
Dise bullet with Unordered list
Shyams/li> - Mahesh sul Output dis + Ram * Shyam © Mahesh This is an example of a circle bullet. Example circte bullets: ‘
shyams/li>Cirele bullets with Unordered list
- Rame/li>
- Shyam
- Mahesh
shtmt> Output © Ram Shyam Mahesh This is an example of a square bullet. Example square bullet: S!DOCTYPE htuml> <
Square Bullets with Unordered list
Ram
- Mahesh
shtml rypessquare">yutput + Ram Shyam «Mahesh. Numbered lists Similar example given here using a nunibered list format; Example Numbers: Sh2>Numbers are used for Ordered List
- Ram
Shyam Mahesh Output: 1 Ram 2. Shyam 3. Mahesh This is an example of an upperease letter use in list, Example Uppercase Letter: =IDOCTYPE bimi> bimnl>
Letters are used for Ordered List
- Shyam
- Mahesh
Output:A. Ram B. Shyam C. Mahesh This is an example of @ lowercase letter use in list, Example Lowercase Letter: shiml> < Lowerease Letters are used for Ordered List
sli-Ram
Shyam Mahesh Outpu a. Ram b, Shyam ¢._ Mahesh. This is an example of roman letters. le Roman letters: Roman Numbers are used for Ordered List
- Ram
- Shyam
- Mahesh
slol> Output Ram I. Shyam I Mahesh2.3.6 BLOCKQUOTE For a long quotation in the text, we can use a < blockquote > tag and the text enclosed within this tag indicates an extended quotation. Blockquote texts are generally rendered by the browser as indented text, It looks like this:...2.3.7 HORIZONTAL LINE We can insert a horizontal rule tag
to separate a paragraph into different sections, A horizontal rule-line is displayed as shown below. This is an example of a horizontal line This is an example of 2 horizontal line 2.4 Title and footers Title definition and Usage Theis an important tag which required to shown the title of the HTML documents and it only contains text and other tags containing in the title are ignored. The title is displayed in the browser's toolbar. It also shows the favorite pages title which we added during browsing and in search-engine results title. This is an illustrative example of title tag Example: First HTML script for web page Jere Fast TN ep fa oe seittarwed = |Footer definition and Usage Thestitle> First HTML s sshead> pt for web page elements in one document, This is an example of a footer. Example: S!DOCTYPE html> Note: versions.
s/html> [email protected]>. strong> The footer tag is supported only from Intemet Explorer 9 and later Output; © |W Aei//einern rete aint =/o © nik erat bes Puede TEE Eth 1 asia es ‘Note: The focter tar is suppurted onl Som internet Explorer 9 ans later versions 2.5 Text Formatting The text formatting tays are used to change the appearance of some text so that it looks different from normal text in web pages. Several formatting tags are consists in HTML to format the text, like , ete. The following HTML tags can be used to display special types of text: Sins» - Inseried text Sdel> - Deleted text = Italic text - Bold text - Small text ~Emphasized text - Important text - Marked text© - Subscript text © - Superseript text 2.5.1 HTML and Elements The HTML tag displays bold text, without any extra importance, Exampli SIDOCTYPE html>Example ofa simple text.
Example of a bold (ext.
Output: Example of a simple text Example of a bold text. 2.5.2 HTML and Elements The HTML shiml> Example of a simple text.
Output Example of a simple text, Example of italic text. 2.5.3HTML Element The HTML tag defines smaller text: hina FormattingHTML
Small
The del tay defines deleted (removed) text.
llike to play Cricket Football.
The font size is big
The font size is small.
Output: 2.6.6 Changing foreground and background color Here is an example of foreground and background color Exampl
. We can also
embed the images inside other elements such as anchors. When embedded le an anchor, then
the user left clicks on the image, they will go to the designated link (rather, their browser will
load a file from the designated link), The
element has no ending tag. The syntax of
embedding an image is follows:
Here, ste attributes defines « path pointing to the image from where we want to embed.IMG Attributes
Sr. | IMG Attributes Function of attributes
Now
1. [ALT="Home" Image not found massage shows.
2._| ALIGN="TOP" Set image alignment like left. right. top. bottom ete.
3._ | VSPACE-3 Upper and lower space in pixels of an image between texts.
(4 Hspace=s Lefl and right Space in pixels of an image between fexts,
5. | BORDER=10 Seta border around the image with a specific width.
6._| HEIGHT=33 Set image height based on the browser height.
a wipTesis ‘Set image width based on the browser height.
8. | ISMAP It represents image map and user can point and click different
parts of the image to load other web pages.
(9. | USEMAP Specifies the client sitle image map file to be used
Table 2.1 Image Attributes
The line break element,
and the horizontal rule element
may be placed inside the
element,
An example of adding an image source.
Example:
tags are used to create different table in our web pages. Each table row is
defined with the
tg. A table header is defined with the tag. By default, able headings
are bold and centered. A table data/cell is defined with the tag, This is an example of
HTML table with border where border width is |.
Example:
‘ Student Name
Subject
<Marks Ram-
‘std>HTML
87
sre
Shyam-/td>
HTML
73
Displays a table
Represents a header cell ina table
A row ina table
std> Acell ina table
Student Name
Subject
<Marks
sltr>
<>
Ram
std>87
<>
<>
Shyams/té>
HTML
td>73Ghanshyam
HTML
67