Anda di halaman 1dari 7

Q11.

Write the HTML code to align a table to the (i) Right (ii) Left (iii) Centre (i) <table border="1" align="right"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> (ii) <table border="1" align="left"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> (iii) <table border="1" align="centre"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Q12. What is DHTML? DHTML is the art of making HTML pages dynamic. DHTML is a combination of technologies used to create dynamic and interactive Web sites. To most people DHTML means a combination of HTML, Style Sheets and JavaScript.

Q12(a). Is HTML a programming language? Explain. HTML is not a programming language because Programming languages have functional purposes but HTML, as a markup language doesnt really do anything in the sense that a program does. HMTL simply contains no programming logic. It doesnt execute actions. It doesnt have conditional statements such as If and Else. It doesnt handle events and carry out tasks. You cant declare any variables. It doesnt take input and creates output. It doesnt define processes or functions that can modify or manipulate data.

Q12(b). State the difference between DHTML and HTML. DHTML Acronym for Dynamic HTML. An extension of HTML that enables, among other things, the inclusion of small animations and dynamic menus in Web pages. DHTML code makes use of style sheets and JavaScript. DHTML uses client side scripting to change variables in the presentation which affects the look and function of an otherwise static page. HTML HTML is static.

HTML sites relies solely upon client-side technologies. This means the pages of the site do not require any special processing from the serverside before they go to the browser. In other words, the pages are always the same for all visitors static. HTML pages have no dynamic content, as in the examples above.

Q12(c). What are the features of DHTML? Some most important features of DHTML are given below: 1.Using DHTML we can change the tags and their properties. 2.It is use for Real-time positioning. 3.It is used to generate dynamic fonts (Netscape Communicator). 4.Used for Data binding (Internet Explorer).

Q12(d). How to handle Events with DHTML? Event is use to trigger actions in the browser. When client click on the element, associated action will started. Like: an JavaScript will started when client click on element. Using Event Handler we can do like that, When an event occur it will execute code associated with that element. Example: In this example header will changes when client clicks. <h1 onclick="this.innerHTML='abc!'">Click on this text</h1> We can add a script in the head section and then we call the function from the event handler. Example: <html> <head> <script type="text/javascript"> function changetext(id) { id.innerHTML="abc!"; } </script> </head>

<body> <h1 onclick="changetext(this)">Click on this text</h1> </body> </html>

Q12(e). How FontSize and Font Size is differ in DHTML? Font size is an attribute that we used in font tag.Where as font-size is an style property.

<font size="5"> use in font tag. p{font-size:"5"} use in CSS. Q13. Explain some core HTML attributes. Core Attributes Valid in all elements, except: <base>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>. Attribute Description class id style title Specifies one or more classnames for an element (refers to a class in a style sheet) Specifies a unique id for an element Specifies an inline CSS style for an element Specifies extra information about an element

Language Attributes Valid in all elements, except: <base>, <br>, <frame>, <frameset>, <hr>, <iframe>, <param>, and <script>. Attribute Description dir lang xml:lang Specifies the text direction for the content in an element Specifies the language of the element's content Specifies the language of the element's content (for XHTML documents)

Keyboard Attributes Attribute Description accesskey tabindex Specifies a shortcut key to activate/focus an element Specifies the tabbing order of an element

Q13(a). Explain Posting copy and Paste HTML. For those wanting to post direct Copy&Paste HTML on screen without the use of spaces or *s etc. and the need to explain those substitutions: Use &lt; to substitute for each opening tag < in each tagged set of HTML. Example, typing the following: &lt;a href="http://www.ebay.com">&lt;img src="http://pics.ebay.com/aw/pics/mask.gif">&lt;/a> Will show up on screen as: <a href="http://www.ebay.com"><img src="http://pics.ebay.com/aw/pics/mask.gif"></a> Which when copied will result in a hyperlink to eBay.com using the mask gif as the link. Q14. Explain list in HTML. There are three types of lists in HTML:

Ordered Lists: These are sometimes called numbered lists, and list items that have a specific numerical order or ranking. Unordered Lists: These are sometimes called bulleted lists, because they have small bullet icons in front of the list items. They are for lists that don't have a required order. Definition Lists These are lists of items that have two parts, a term to be defined and the definition. Ordered Lists Use the <ol> tag (the ending </ol> tag is required), to create a numbered list with numbers starting at 1. The elements are created with the <li> tag (the ending </li> tag is not required in HTML, but required in XHTML). For example: <ol> <li>Entry 1</li> <li>Entry 2</li> <li>Entry 3</li> </ol> Example: <ol> <li>Coffee</li> <li>Milk</li> </ol> How the HTML code above looks in a browser: 1. Coffee 2. Milk Use ordered lists anywhere you want to show a specific order for the list items to be followed, or to rank items sequentially. These lists are most often found in instructions and recipes. Unordered Lists Use the <ul> tag (the ending </ul> tag is required) to create a list with bullets instead of numbers. Just like with the ordered list, the elements are created with the <li> tag. For example: <ul> <li>Entry 1</li> <li>Entry 2</li> <li>Entry 3</li> </ul> Example: <ul> <li>Coffee</li> <li>Milk</li> </ul> How the HTML code above looks in a browser: Coffee Milk Use unordered lists for any list that doesn't have to be in a specific order. This is the most common type of list found on a web page. Definition Lists Definition lists create a list with two parts to each entry: the name or term to be defined and the definition. This creates lists similar to a dictionary or glossary. There are three tags associated with the definition list: <dl> to define the list <dt> to define the definition term <dd> to define the definition of the term

HTML does not require the closing tag for the <dt> or the <dd>, but it's a good idea to use them so other parts of your design aren't confused. And the ending tags are required in XHTML. Here is how a definition list looks: <dl> <dt>This is a definition term</dt> <dd>And this is the definition</dd> <dt>term 2</dt> <dd>definition 2</dd> <dt>term 3</dt> <dd>definition 3</dd> </dl> Example: 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 Use definition lists anywhere you have a list that has two parts to each item. The most common use is with a glossary of terms, but you can also use it for an address book (name is the term and the address is the definition), or an HTML form (field name is the term, input box is the definition), or for any list of name/value pairs. Q15. Describe frame document structure in HTML Frame Document Structure Frames in HTML documents are created and controlled through the structure of three element types: FRAMESET, FRAME and NOFRAMES. A web page containing frames is created by a main or "framing" document. This document defines the frame regions on the user agent's page or window, and addresses the documents or objects that initially appear in the frames. Hypertext anchors within any frame can also target specific frames to place the contents of addressable documents and objects. The structure of a frame-enabling HTML document type is similar to usual HTML structure. The key difference in an HTML document type is that the BODY container element is basically replaced by a FRAMESET container element. The initial FRAMESET element describes the frames that make up the page, and the FRAME elements specify the sub-documents that appear initially in each. A FRAMESET may only contain nested FRAMESET and FRAME elements. When a FRAMESET element is nested within another FRAMESET element, it acts as a subframe. A BODY element can follow the FRAMESET to provide an alternative document for user agents that do not support frames. And a BODY element can contain NOFRAMES elements whose contents are not to be rendered by user agents which support frames. A frame document contains a set of frames, each of which likely uses the BODY element. Elements that might normally be placed in the BODY element should not appear before the first FRAMESET element, or the FRAMESET will be ignored. The FRAMESET tag has a matching end tag. Frame Document Syntax Frame syntax is similar in scope and complexity to that used by tables, and has been designed to be quickly processed by Internet client layout engines. <HTML> <HEAD> </HEAD> <FRAMESET rows="33%,33%,33%"> <FRAMESET cols="50%,50%"> <FRAME name="frame1"> <FRAME name="frame2"> </FRAMESET> <FRAME name="frame3">

<FRAME name="frame4"> </FRAMESET> <BODY> ...contents to display in non-frame-capable user agent... </BODY> </HTML> Q16. What is frameset in HTML? How do you create a frameset? The collection of frames in a browser window is referred to as a frameset. The document which defines all the frames in a frameset is called the frameset document. A frameset document is just like any other HTML source document except that the body tags (<BODY> & </BODY>) are replaced by frameset tags: A frame page is created using an HTML document without a body. An HTML frames document has a <head> and, in place of the body, a <frameset>. The <frameset> tag requires an end </frameset> tag. The <frameset> section specifies the layout of views in the window in terms of rectangular subspaces using the <frameset> element's <rows> or <cols> attributes. Frame Layout -- Rows and columns. rows= This attribute specifies the layout of horizontal frames. Its properties are a commaseparated list of either absolute values in pixels, percentages, and relative lengths. The default value is 100%, meaning one row. cols= This attribute specifies the layout of vertical frames. Its properties are the same as those of rows. This example divides the screen horizontally in two equal rows (frames) using percentages. <HTML> <HEAD> </HEAD> <FRAMESET ROWS="50%,50%"> <FRAME SRC="frame_h.html"> <FRAME SRC="frame_h.html"> </FRAMESET> </HTML> Setting the <rows> attribute defines the number of horizontal subspaces in a frameset. Frames are created top-to-bottom for rows. If the <rows> attribute is not set in a nested frameset column, each column extends the entire length of the page. Setting the <cols> attribute defines the number of vertical subspaces. Frames are created left-to-right for columns. If the <cols> attribute is not set in a nested frameset row, each row extends the entire width of the page. If neither the rows or cols attribute is specified, the frame takes up exactly the size of the page. Q16(a). Discuss some frame attributes in HTML. Frame Attributes name = "..."> assigns a name to the current frame. This name may be used as the target of subsequent links. src = "..."> specifies the location of the initial contents to be contained in the frame. This can be a relative or an absolute path. noresize> tells the browser that the frame window must not be resizeable. scrolling = auto|yes|no> specifies scroll information for the frame window. Auto tells the browser to provide scrolling devices for the frame window when necessary. This is the default value. Yes tells the browser to always provide scrolling devices for the frame window. No tells the browser not to provide scrolling devices for the frame window. frameborder = 1|0> provides the browser with information about the frame border. 1 tells the browser to draw a separator between this frame and every adjoining frame. This is the default value. 0 tells the browser not to draw a separators. marginwidth = pixels> specifies the amount of space to be left between the frame's contents in its left and right margins. The value must be a positive value.

marginheight = pixels> specifies the amount of space to be left between the frame's contents in its top and bottom margins. Q17. Explain the special target name available in frame. The assignment of frame identity is accomplished via the NAME attribute in the FRAME element. The addressing of these frames occurs when a user initiates an action command with a TARGET attribute that specifies the NAME of a frame to use as a destination for its action. The TARGET attribute is used by the A, AREA, BASE and FORM . If the frame name specified does not exist, the action will load in a new browser window using the given frame name. Note: The window name specified by a TARGET attribute must begin with an alpha-numeric or underscore characters ("_") to be valid. All other window names should be ignored. Special Target Names: TARGET="_blank" This target will cause the link to always be loaded in a new blank window. This window is not named. TARGET="_parent" This target makes the link load in the immediate FRAMESET parent of this document. This defaults to acting like "_self" if the document has no parent. TARGET="_search" This target causes the link to load in the browser's Search pane. (Internet Explorer 5.0 and later.) TARGET="_self" This target causes the link to always load in the same window where the action originated. This is useful for overriding a globally assigned BASE target. TARGET="_top" This target makes the link load in the full body of the window. This defaults to acting like "_self" if the document is already at the top. It is useful for breaking out of an arbitrarily deep FRAME nesting. Q18. What is Lynx, and how do I use it? Lynx is one of the most popular web browsers for command-line interfaces. Unix is the primary operating system that uses it, but versions are also available for VMS, DOS, Windows 95 and later, Mac OS, Mac OS X, and Amiga OS. Lynx was designed to display plain ASCII text on simple terminals, without including any multimedia content. This lets you view hypertext documents and navigate through lists of links with just your keyboard. You can't use a mouse, display graphical images, or play sound files. Lynx is convenient for modem users because it requires less information transfer than graphical browsers that load large multimedia files. People with network connections, for whom transmission time is less of a concern, may prefer to use graphical browsers such as Firefox or Internet Explorer. Q19. Write short note on ADO. ActiveX Data Objects (ADO) is an application program interface from Microsoft that lets a programmer writing Windows applications get access to a relational or non-relational database from both Microsoft and other database providers. For example, if you wanted to write a program that would provide users of your Web site with data from an IBM DB2 database or an Oracle database, you could include ADO program statements in an HTML file that you then identified as an Active Server Page. Then, when a user requested the page from the Web site, the page sent back would include appropriate data from a database, obtained using ADO code. Q20. Write short note on FTP. File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over Internet. It is often used to upload web pages and other documents from a private development machine to a public web-hosting server. FTP is built on a client-server architecture and uses separate control and data connections between the client and the server. FTP users may authenticate themselves using username and password, but can connect anonymously if the server is configured to allow it. For secure transmission that hides (encrypts) your username and password, as well as encrypts the content, you can try using a client that uses SSH File Transfer Protocol.

Anda mungkin juga menyukai