Computer Lab File: To-Ms. Jyoyi by - Shivani Kapoor Bba (Morning Batch) Ivth Sem. 00114101709
Computer Lab File: To-Ms. Jyoyi by - Shivani Kapoor Bba (Morning Batch) Ivth Sem. 00114101709
TO- MS. JYOYI BY- SHIVANI KAPOOR BBA (morning batch) IVth sem. 00114101709
CONTENTS
WEB BROWSER:
A web browser or Internet browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content.[1] Hyperlinks present in resources enable users to easily navigate their browsers to related resources. Although browsers are primarily intended to access the World Wide Web, they can also be used to access information provided by Web servers in private networks or files in file systems. Some browsers can also be used to save information resources to file systems.
HTML:
HTML, which stands for Hypertext Markup Language, is the predominant language for web pages. HTML is the basic building-blocks of WebPages. HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h1> and </h1>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tables, images, etc. The purpose of a web browser is to read HTML documents and compose them into visual or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page. HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML WebPages. Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup.
DOCUMENT TAG:
Document tags define the overall structure of an HTML document. There are four tags every HTML document should have. These tags define the type of document it is, and the major sections. These tags are<HTML>, <HEAD>, <TITLE>, and <BODY ...>. You may also wish to use the <! DOCTYPE ...> declaration under some circumstances. A really basic document might look like this: <HTML> <HEAD> <TITLE>A Really Basic Document</TITLE> </HEAD> <BODY> This is a really basic document. </BODY> </HTML>
EMPTY ELEMENTS:
In the HTML Document Type Definition, a very few elements are declared as EMPTY. This means two things: 1. They do not contain any text. They are used simply as markers (and in some cases are used for whatever is contained in their attributes. 2. EMPTY attributes are not permitted to have an end-tag. Thus <img src="blahblah.gif"></img> is illegal. Of the elements used in SUL/AIR, the only EMPTY elements are
<Hr> and <br> are used simply as markers and cause a horizontal rule or line break to be inserted in the output. <img> and <input> (which is only used in forms), are used for the attributes they carry. For example, <img src="globedfruit.gif"> tells the browser to insert the file "globedfruit.gif" into the output. There are several other EMPTY elements (<link>, <isindex>, <base>, <meta>, <nextid>), but these are not normally used in SUL/AIR documents Do not confuse an EMPTY element with an element that just happens to have nothing in it at the moment. <br> is an EMPTY element; it is not permitted to have any content. But <p></p> is a paragraph that just happens not to have any words in it (the browser would insert an empty line into the output.
COMMENT TAG:
The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date. You can also store program-specific information inside comments. In this case they will not be visible for the user, but they are still available to the program. A good practice is to comment the text inside scripts and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text. A comment declaration starts with <!, followed by zero or more comments, followed by >. A comment starts and ends with "--", and does not contain any occurrence of "--". This means that the following are all legal SGML comments: 1. 2. 3. 4. 5. <!-- Hello --> <!-- Hello -- -- Hello--> <!----> <!------ Hello --> <!>
Note that an "empty" comment tag, with just "--" characters, should always have a multiple of four "-" characters to be legal. (And yes, <!> is also a legal comment - it's the empty comment).
Implicit HTML Tags Implicit styles are often called logical styles, since they allow the browser some freedom in how it will display the text. These tags, like the header tags, are generally relative to
one another, depending on the browser being used to view them. See Table 7.2 for some of the common implicit (logical) tags Some Basic Logical HTML Tags Meaning Generally Rendered as Emphasis Italic text Strong emphasis Bold text Teletype Monospaced text
<STRONG>, </STRONG>
BLOCKQUOTE Element:
The BLOCKQUOTE element defines a block quotation of text. A typical browser will render this in an appropriate way, for example by slightly indenting the text, or by italicizing it. BLOCKQUOTE also causes a paragraph break, and typically forces white space both before and after the quotation. BLOCKQUOTE can contain paragraphs, and most standard markup. For example, the following text: I think it ends <BLOCKQUOTE><P>Soft you now, the fair Ophelia. Nymph, in thy orisons, be all my sins remembered. Fair twilight, and foxy swarms of ants, did slyly open the jars of jam. </p> </BLOCKQUOTE> but I might be wrong. Is rendered as follows: I think it ends Soft you now, the fair Ophelia. Nymph, in thy orisons, be all my sins remembered. Fair twilight, and foxy swarms of ants, did slyly open the jars of jam. but I might be wrong.
PRE-FORMATTING TEXT:
The PRE element contains preformatted text. Visual browsers should render preformatted text in a fixed-width font, should not collapse whitespace, and should not wrap long lines. PRE is useful for formatting computer code or poetry where whitespace is important, but since preformatted text is inherently visual, authors should avoid dependence on it wherever possible. When using PRE, authors should avoid altering the element's fixed-width font or non-collapsing whitespace properties by means of style sheets. The following example features Java code in a PRE element: <PRE><CODE CLASS=Java> class HelloWorld {public static void main(String[] args) System.out.println("Hello World!");}} </CODE></PRE> The code in the preceding example would be more difficult to read if it were not preformatted, and so PRE is used to provide the proper spacing. Note that the CODE element is also included to add structural information.
Display Example: This is how it looks like in your browser. <h1>Different Font Sizes</h1> <p>Text in standard font, usually "Times New Roman" - size: 3 color: black.</p> <p> <font <font <font <font <font <font </p> size="1"> size="2"> size="4"> size="5"> size="6"> size="7"> Font Font Font Font Font Font size size size size size size 1 2 4 5 6 7 </font> </font> </font> </font><br> </font> </font>
2. Font Colors To change the text color you need to add the attribute COLOR to the opening FONT tag and assign it a value for the color. The color value can be any of the following 16 color names: black, silver, white, gray, maroon, red, blue, green, yellow, purple, fuchsia, cyan, lime, olive, navy, teal, aqua. Instead of the color names, you can also use the hexadecimal numbers for the colors, which are specified according to the RGB value for each color. The hexadecimal numbers must be prefixed by the "#" sign. Examples: #000099 for dark blue or #FFFF99 for a faint yellow. Dont worry about hexadecimal numbers, the easiest way to find the correct code for any color is to use 1stPage2000s color picker. Study the example below first and then watch the video to learn how to use the color picker.
Display Example: This is how it looks like in your browser. <h1>Different Font Colors</h1> <p>Text in standard font, usually "Times New Roman" - size: 2 color: black.</p> <p> <font <font <font <font </p> size="4" color="blue"> Font size 4, blue color </font> size="5" color="green"> Font size 5, green color </font><br> size="2" color="#FFFF00"> Font size 2, yellow color </font> color="#FF0000"> Standard font size, red color</font>
3. Different Fonts To change the font style from the default (Times New Roman) to a different style, simply add the attribute FACE to the opening FONT tag. As value for the FACE attribute you can use any specific font name such as "verdana", "arial", "georgia", "bookman old style", "comic sans ms" and many more. Alternatively you may use generic font styles such as "serif", "sans-serif", "cursive", "fantasy" and "monospace". The font face values are case-insensitive, i.e. it doesnt matter whether you type "Arial" or "arial". Beware! Not all users might have all the font styles installed on their computers, so especially when you are planning to use very specific fonts, you should specify at least one alternative font style (either a more common font name or a generic font). Simply add one or two more comma-separated values to the FACE attribute, which is also shown in the example below.
Display Example: This is how it looks like in your browser. <h1><u>Different Font Faces, Colors and Sizes Combined</u></h1> <p>Text in standard font, usually "Times New Roman" - size: 3 color: black.</p> <p><font face="verdana">font face Verdana</font></p> <p><font face="Mistral" size="6" color="navy"> font face: Mistral, size: 6, color: navy</font></p> <p><font face="Comic Sans MS">font face Comic Sans MS</font></p> <p><font face="courier" size="2">font face Courier, size 2</font></p> <p><font face="Helvetica, arial" color="#006633"> font face Helvetica, alternatively Arial, color: dark green</font></p> <h2><u>generic font styles</u></h2> <p><font size="4"> <font face="cursive">cursiv (f.ex. Comic Sans MS)</font><br> <font face="monospace">monospace (f.ex. Courier New)</font><br> <font face="fantasy">fantasy (f.ex. Western)</font><br> <font face="sans-serif">sans-serif (f.ex. Helvetica)</font><br> <font face="serif">serif (f.ex. Times)</font> </font></p>
BASEFONT TAG:
To specify the overall font for your page add the <basefont> tag at the beginning of the <body> section. Example: The page as it looks in the browser. Hello! This is my page. All text looks the same since I only specified a basefont.
HTML: The code to produce the above example. <html> <head> <title>my page</title> </head> <body> <basefont face="arial, verdana, courier" size="4" color="green"> Hello! This is my page.<br> All text looks the same<br> since I only specified a basefont.<br> </body> </html>
The color attribute selects the desired color for your text. The face attribute selects the desired font.
Unordered Lists:
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items are marked with bullets (typically small black circles).
<ul> <li>Coffee</li> <li>Milk</li> </ul> How the HTML code above looks in a browser:
Coffee Milk
HTML Ordered Lists An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items are marked with numbers. <ol> <li>Coffee</li> <li>Milk</li> </ol> How the HTML code above looks in a browser: 1. Coffee 2. Milk
DEFINITION LIST:
A definition list is a list of items, with a description of each item. The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):
<dl> <dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl> How the HTML code above looks in a browser: Coffee - black hot drink Milk - white cold drink
MENU LIST:
The MENU element defines a menu list. The element contains one or more LI elements that define the actual items of the list. The LI elements must not contain block-level elements, which prevents MENUs from being nested. The COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.
MENU is deprecated in HTML 4 in favor of UL. <menu> <li>html</li> <li>xhtml</li> <li>css</li> </menu>
DIRECTORY LIST:
The DIR element is similar to the UL element. It represents a list of short items, typically up to 20 characters each. Items in a directory list may be arranged in columns, typically 24 characters wide. <DIR> </DIR>