html_interview questions

August 7, 2017 | Author: Vineet Kumar Seth | Category: Xhtml, Html, Html Element, Xml, Markup Language
Share Embed Donate

Short Description

Download html_interview questions...


c  Y Æ    Ã c    c c                              


c                                                                           Æ  Æ  Æ    A document type declaration (doctype) is a special identifier at the top of a webpage that contains or refers to a document type definition (DTD). A DTD tells the browser what elements and attributes exist in the document's markup language and where they may be used

 ! Æ    "   c              # c                 c         c                                             c     Æ                u à      c             ÃÃ!   à           · Æ  $ %   &   à             '   $$ (

¦   These elements do not force new lines before or after its placement, and it only consumes as much space as necessary.

G New lines appear before and after the element with it consuming the full width available. Block element will create the box, So you can position the element in different location.    ) Æ $&

ÃÃ        c      "             Æ!*&+,       #   #    #   #   



  -*&+,       #     #    #   



  .   $


                                                                       $            / Æ    A document type declaration (doctype) is a special identifier at the top of a webpage that contains or refers to a document type definition (DTD). A DTD tells the browser what elements and attributes exist in the document's markup language and where they may be used. A doctype is required at the top of every SGML and XML document, including HTML and

XHTML. Webpages typically contain a doctype with a reference to a universally known DTD, rather than including all of the information in a custom-made file or the webpage itself. The danger of using a custom-made DTD is that while the web developer may understand what the custom elements and attributes mean, browsers and search engines don't. ‘    ‘ 


 c          % &             '      u

 c       & (             '      '   

   c                Y   $$  " 

The tag defines a label for an input element. The label element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the label element, it toggles the control. The for attribute of the tag should be equal to the id attribute of the related element to bind them together. Span :The tag provides no visual change by itself. The tag provides a way to add a hook to a part of a text or a part of a document. When the text is hooked in a span element you can add styles to the content, or manipulate the content with for example JavaScript.

 YY   $$   " 



                                    Y & $     Ã         )  c 

    Y! Æ !         "*   "+* ' "   "  "         " "    "+* '          " "    "(      

    " "

   "     Y    01 Ã  " ,  -  " ,    Y· &   2    2          " 

           c  Ãc   Ã

  & ÃÃ   ÃÃ"     "u  

            c  Ãc   Ã

  & ÃÃ    ÃÃ"    "     Y'  2 & '      

Y      The many benefits of CSS-based tableless layouts are ... ÿ In our opinion, one of the biggest benefit of CSS-based layout is it is much more easier to update and change. If you have ever try to change a table-based layout that contains duplicate width attributes all over the place, nested tables within tables, and excessive use of colspan and rowspan, you can understand how difficult a table-based layout is to update and change. The code of CSS-based layout is much cleaner with less clutter because it provides separation between content and presentation. The content is in the HTML file and presentation of that content is control by the CSS stylesheet. This make updates and maintenance of sites easier.   In general, CSS tableless layouts are based on "div" tags, whereas table-based layouts are based on "table" tags which brings along all its children "tr" and "td" tags. Hence CSS tableless layouts in general contains fewer code and tags. ÿ  Because of the few tags used, CSS tableless layouts provide a higher content to code ratio and put content higher up in the source order. Search engines love this and generally this will improve SEO.  Again, because of the lesser number tags, there is less code that goes across the wire and hence theoretically should be faster. We say "theoretically" because any performance gains are not generally perceptible by the human eye. As Wikipedia mentions, "the bandwidth savings are generally minor at best. It is perfectly possible to build a web page with tables that is lightweight." Just as it is perfectly possible to build a lightweight tableless web page. The "weight" is less influenced by the code than by the images.  Semantics refers to the concept that one use tags as they are what they are designed for and what they actually mean. So "purists" will say that "table" tags means tabular data and hence should only be used for that and not for layout purposes.

Y.   ‘ Answer1: XHTML is a more formal, stricter version of HTML. XHTML is defined by an XML dtd which makes it much easier to handle. Answer2: * XHTML stands for eXtensible Hyper Text Markup Language. * It is aimed to replace HTML. * It is almost identical to HTML 4.01 * It is the reformulation of HTML 4.01 as an application of XML. * It is a stricter, tidier version of HTML. XHTML 1.0 is the next level of coding as specified by the W3C. XHTML is a transition / combination of HTML and XML. To change from HTML to XHTML requires just a few changes in your coding styles. The main page to check out is CONVERTING but all the others provide valuable information about this coding technique as well. XHTML provides the framework for future extensions of HTML and aims to replace HTML in the future. Some resources refer to XHTML as HTML5. XHTML 1.0 became an official W3C recommendation on January 26, 2000. A W3C recommendation means that the specification is stable, that it has been reviewed by the W3C membership, and that the specification is now a Web standard. XHTML 1.0 is the first step toward a modular and extensible web environment based on XML (eXtensible Markup Language). It provides the bridge for web designers to use a future based

coding and still be able to maintain compatibility with today's browsers. XHTML is a stricter and cleaner version of HTML. Answer3: * XHTML stands for EXtensible HyperText Markup Language * XHTML is aimed to replace HTML * XHTML is almost identical to HTML 4.01 * XHTML is a stricter and cleaner version of HTML * XHTML is HTML defined as an XML application * XHTML is a W3C Recommendation XHTML is a combination of HTML and XML (EXtensible Markup Language). XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML. Advantages of using XHTML instead of HTML 1. Documents can be validated much easier 2. Documents can be transformed via tools like XSLT into other documents for consumption by devices like handhelds 3. Fragments of documents can be retrieved faster 4. Text can be stored more effieciently in object oriented databases

Answer4: The great thing about XHTML, though, is that it is almost the same as HTML, although it is much more important that you create your code correctly. You cannot make badly formed code to be XHTML compatible. Unlike with HTML (where simple errors (like missing out a closing tag) are ignored by the browser), XHTML code must be exactly how it is specified to be. This is due to the fact that browsers in handheld devices etc. don't have the power to show badly formatted pages so XHTML makes sure that the code is correct so that it can be used on any type of browser. Answer5: XHTML combines XML and HTML 4 to provide developers with a language that conforms to the XML format, as opposed to HTML which is based on SGML. XML is much simpler to parse than SGML, and standards exist such as XSLT, XPath, and XQuery for manipulating XML documents. Unfortunately, support for XHTML in browsers is poor, with the leading browser, Microsoft Internet Explorer, not supporting the XHTML mime type 'application/xhtml+xml'.

 Y/ Æ  13  )              u '     %Ã     $  2454"0 2 $                           


             Y Æ   6 6$$2 When you have a form label for a radio button, you can specify a "for" attribute in the label matching the "id" attribute of the radio button's input tag, which makes the label clickable.

               Ã                  2 $ (2  2        "+                 +  ! -    $2             

%         Æ  2  2 7Æ   


View more...


Copyright ©2017 KUPDF Inc.