IPT 11-20

Embed Size (px)

Citation preview

  • 7/29/2019 IPT 11-20

    1/7

    Q11. Write the HTML code to align a table to the(i) Right(ii) Left(iii) Centre

    (i) MonthSavings

    January$100

    (ii) MonthSavings

    January$100

    (iii) MonthSavings

    January$100

    Q12. What is DHTML?DHTML is the art of making HTML pages dynamic. DHTML is a combination of technologies used tocreate 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 purposesbut 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 conditionalstatements such as If and Else. It doesnt handle events and carry out tasks. You cant declare anyvariables. 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 animationsand 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 thelook and function of an otherwise static page.

    HTML HTML is static.

  • 7/29/2019 IPT 11-20

    2/7

    HTML sites relies solely upon client-side technologies. This means the pages of the site donot require any special processing from the serverside before they go to the browser. Inother 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 actionwill 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 withthat element.

    Example:

    In this example header will changes when client clicks.

    Click on this text

    We can add a script in the head section and then we call the function from the event handler.

    Example:

    function changetext(id)

    {

    id.innerHTML="abc!";

    }

  • 7/29/2019 IPT 11-20

    3/7

    Click on this text

    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.

    use in font tag.

    p{font-size:"5"} use in CSS.

    Q13. Explain some core HTML attributes.Core AttributesValid in all elements, except: , , , , , , ,and .

    Attribute Description

    class Specifies one or more classnames for an element (refers to a class in a style sheet)

    id Specifies a unique id for an element

    style Specifies an inline CSS style for an element

    title Specifies extra information about an element

    Language Attributes

    Valid in all elements, except: ,
    , , , , , ,and .

    Attribute Description

    dir Specifies the text direction for the content in an element

    lang Specifies the language of the element's content

    xml:lang Specifies the language of the element's content (for XHTML documents)

    Keyboard Attributes

    Attribute Description

    accesskey Specifies a shortcut key to activate/focus an element

    tabindex 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 < to substitute for each opening tag < ineach tagged set of HTML.Example, typing the following:

    Will show up on screen as:

    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:

    http://www.w3schools.com/tags/att_standard_class.asphttp://www.w3schools.com/tags/att_standard_id.asphttp://www.w3schools.com/tags/att_standard_style.asphttp://www.w3schools.com/tags/att_standard_title.asphttp://www.w3schools.com/tags/att_standard_dir.asphttp://www.w3schools.com/tags/att_standard_lang.asphttp://www.w3schools.com/tags/att_standard_accesskey.asphttp://www.w3schools.com/tags/att_standard_tabindex.asphttp://www.w3schools.com/tags/att_standard_id.asphttp://www.w3schools.com/tags/att_standard_style.asphttp://www.w3schools.com/tags/att_standard_title.asphttp://www.w3schools.com/tags/att_standard_dir.asphttp://www.w3schools.com/tags/att_standard_lang.asphttp://www.w3schools.com/tags/att_standard_accesskey.asphttp://www.w3schools.com/tags/att_standard_tabindex.asphttp://www.w3schools.com/tags/att_standard_class.asp
  • 7/29/2019 IPT 11-20

    4/7

    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 thelist 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 tag (the ending tag is required), to create a numbered list with numbersstarting at 1. The elements are created with the tag (the ending tag is not required inHTML, but required in XHTML). For example:

    Entry 1Entry 2Entry 3

    Example:

    Coffee

    Milk

    How the HTML code above looks in a browser:

    1. Coffee2. Milk

    Use ordered lists anywhere you want to show a specific order for the list items to be followed, or torank items sequentially. These lists are most often found in instructions and recipes.

    Unordered Lists

    Use the tag (the ending tag is required) to create a list with bullets instead of numbers.

    Just like with the ordered list, the elements are created with the tag. For example:

    Entry 1Entry 2Entry 3

    Example:CoffeeMilk

    How the HTML code above looks in a browser:

    CoffeeMilk

    Use unordered lists for any list that doesn't have to be in a specific order. This is the most commontype 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 thedefinition. This creates lists similar to a dictionary or glossary. There are three tags associated withthe definition list:

    to define the list to define the definition term

    to define the definition of the term

  • 7/29/2019 IPT 11-20

    5/7

    HTML does not require the closing tag for the or the , but it's a good idea to use themso other parts of your design aren't confused. And the ending tags are required in XHTML.

    Here is how a definition list looks:

    This is a definition term

    And this is the definitionterm 2definition 2term 3definition 3

    Example:dl>Coffee- black hot drinkMilk- white cold drink

    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 commonuse is with a glossary of terms, but you can also use it for an address book (name is the term andthe 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 elementtypes: FRAMESET, FRAME and NOFRAMES.A web page containing frames is created by a main or "framing" document. This document definesthe frame regions on the user agent's page or window, and addresses the documents or objectsthat initially appear in the frames. Hypertext anchors within any frame can also target specificframes 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 keydifference in an HTML document type is that the BODY container element is basically replaced by aFRAMESET container element. The initial FRAMESET element describes the frames that make upthe 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 elementis nested within another FRAMESET element, it acts as a subframe. A BODY element can follow theFRAMESET to provide an alternative document for user agents that do not support frames. And aBODY 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. Elementsthat might normally be placed in the BODY element should not appear before the first FRAMESETelement, or the FRAMESET will be ignored. The FRAMESET tag has a matching end tag.Frame Document SyntaxFrame syntax is similar in scope and complexity to that used by tables, and has been designed tobe quickly processed by Internet client layout engines.

  • 7/29/2019 IPT 11-20

    6/7

    ...contents to display in non-frame-capable user agent...

    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 whichdefines 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 ( & ) arereplaced by frameset tags:A frame page is created using an HTML document without a body. An HTML frames document has a and, in place of the body, a . The tag requires an end tag. The section specifies the layout of views in the window in terms ofrectangular subspaces using the element's or attributes.

    Frame Layout -- Rows and columns.rows= This attribute specifies the layout of horizontal frames. Its properties are a comma-

    separated list of either absolute values in pixels, percentages, and relative lengths. The defaultvalue is 100%, meaning one row.cols= This attribute specifies the layout of vertical frames. Its properties are the same as those ofrows.

    This example divides the screen horizontally in two equal rows (frames) using percentages.

    Setting the attribute defines the number of horizontal subspaces in a frameset. Frames arecreated top-to-bottom for rows. If the attribute is not set in a nested frameset column,each column extends the entire length of the page. Setting the attribute defines thenumber of vertical subspaces. Frames are created left-to-right for columns. If the attributeis not set in a nested frameset row, each row extends the entire width of the page. If neither therows 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 ofsubsequent 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 itsleft and right margins. The value must be a positive value.

  • 7/29/2019 IPT 11-20

    7/7

    marginheight = pixels> specifies the amount of space to be left between the frame's contents inits 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 TARGETattribute 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 doesnot 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 orunderscore 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 notnamed.

    TARGET="_parent"This target makes the link load in the immediate FRAMESET parent of this document. This defaultsto 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 isuseful 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" ifthe document is already at the top. It is useful for breaking out of an arbitrarily deep FRAMEnesting.

    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 primaryoperating 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 simpleterminals, 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 graphicalimages, or play sound files.Lynx is convenient for modem users because it requires less information transfer than graphicalbrowsers that load large multimedia files. People with network connections, for whom transmissiontime 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 aprogrammer writing Windows applications get access to a relational or non-relational databasefrom both Microsoft and other database providers. For example, if you wanted to write a programthat would provide users of your Web site with data from an IBM DB2 database or an Oracledatabase, you could include ADO program statements in an HTMLfile that you then identified as anActive Server Page. Then, when a user requested the page from the Web site, the page sent backwould include appropriate data from a database, obtained using ADO code.

    Q20. Write short note on FTP.File Transfer Protocol (FTP) is a standardnetwork protocol used to transfer files from one hostto another host over Internet. It is often used to upload web pages and other documents from aprivate development machine to a public web-hosting server. FTP is built on a client-serverarchitecture and uses separate control and data connections between the client and the server.FTP users may authenticate themselves using username and password, but can connectanonymously 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 usesSSH File Transfer Protocol.

    http://searchexchange.techtarget.com/definition/application-program-interfacehttp://searchsqlserver.techtarget.com/definition/databasehttp://searchdatamanagement.techtarget.com/definition/datahttp://searchdatacenter.techtarget.com/definition/DB2http://searchoracle.techtarget.com/definition/Oraclehttp://searchsoa.techtarget.com/definition/HTMLhttp://searchsoa.techtarget.com/definition/HTMLhttp://searchwindowsserver.techtarget.com/definition/Active-Server-Pagehttp://en.wikipedia.org/wiki/Network_protocolhttp://en.wikipedia.org/wiki/Network_protocolhttp://en.wikipedia.org/wiki/Host_(network)http://en.wikipedia.org/wiki/Internethttp://en.wikipedia.org/wiki/Internethttp://en.wikipedia.org/wiki/Client-server_modelhttp://en.wikipedia.org/wiki/SSH_File_Transfer_Protocolhttp://searchexchange.techtarget.com/definition/application-program-interfacehttp://searchsqlserver.techtarget.com/definition/databasehttp://searchdatamanagement.techtarget.com/definition/datahttp://searchdatacenter.techtarget.com/definition/DB2http://searchoracle.techtarget.com/definition/Oraclehttp://searchsoa.techtarget.com/definition/HTMLhttp://searchwindowsserver.techtarget.com/definition/Active-Server-Pagehttp://en.wikipedia.org/wiki/Network_protocolhttp://en.wikipedia.org/wiki/Host_(network)http://en.wikipedia.org/wiki/Internethttp://en.wikipedia.org/wiki/Client-server_modelhttp://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol