Top 49 Html+xhtml Interview Questions
Q1. Write Example That Shows Every Attribute Must Have A Value In Xhtml?
Using instance I will show you in XHTML every attribute ought to have a fee.
Example in HTML:
<ol compact> <input type="radio" name="title" value="decline" checked>decline</input>
Below, I write a same example in XHTML. <ol compact="compact" > <input type="radio" name="title" value="decline" checked="checked">decline</input> In this we assign fee compact, checked to element compact and checked.
Q2. How Do I Use Forms?
The simple syntax for a shape is: <FORM ACTION="[URL]">…</FORM>
When the shape is submitted, the shape statistics is despatched to the URL targeted inside the ACTION attribute. This URL ought to discuss with a server-facet (e.G., CGI) program in an effort to procedure the shape records. The shape itself ought to incorporate
as a minimum one publish button (i.E., an <INPUT TYPE="submit" …> detail),
form records elements (e.G., <INPUT>, <TEXTAREA>, and <SELECT>) as wanted, and
additional markup (e.G., identifying facts elements, offering instructions) as needed.
Q3. What Do You Understand About Doctype In Html?
DOCTYPE is stands for Document Type Declaration.In an HTML every HTML file is started with DOCTYPE announcement.It can be fluctuate for one-of-a-kind variations of HTML.DOCTYPE is used best bySGML gear like as HTML validator.
Example of Document Type Declaration in HTML 4 are,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.W3.Org/TR/html4/strict.Dtd">
Q4. How You Use Form's Action Attribute And Submit Button In Html?
Using Submit Button we will sends the form to the server and Action Attribute is exact that which document we send.
<form name="input" action="submit_form.Php"
method="get"><input type="hidden" name="phpMyAdmin" value="f43d4e0b88acea2d2a393515f6bf38f2" /><input type="hidden" name="phpMyAdmin" value="70ac9566533a2665b6597346aab7f985" />
Formname:
<input type="text" name="Form">
<input type="submit" value="Submit">
</form>
When we click the sumbit button net web page than the submit_form is ship to the server.
Q5. What Is A Doctype? Which One Do I Use?
According to HTML standards, each HTML document starts offevolved with a DOCTYPE announcement that specifies which version of HTML the file uses. Originally, the DOCTYPE declaration turned into used handiest by SGML-based tools like HTML validators, which needed to decide which version of HTML a file used (or claimed to use). Today, many browsers use the report's DOCTYPE announcement to decide whether or not to apply a stricter, greater standards-orientated layout mode, or to apply a "quirks" format mode that attempts to emulate older, buggy browsers.
Q6. How Many Tags Are Defined In Xhtml 1.Zero?
There are seventy seven tags defined in XHTML 1.Zero:
a abbr acronym address vicinity b base bdo huge blockquote body br button caption cite code col colgroup dd del dfn div dl dt em fieldset form h1 h2 h3 h4 h5 h6 head hr html i img enter ins kbd label legend li link map meta noscript item ol optgroup alternative p param pre q samp script pick out small span sturdy style sub sup desk tbody td textarea tfoot th thead name tr tt ul var.
Q7. How To Get Ready For Xhtml?
XHTML isn't always very extraordinary from HTML 4.01, so bringing your code up to the 4.01 wellknown is a superb begin. In addition, you must begin NOW to write your HTML code in lowercase letters.
The Most Important Differences:
XHTML factors have to be properly nested
XHTML documents should be well-formed
Tag names have to be in lowercase
All XHTML elements need to be closed
Q8. Is Is Right Only Certain Tags May Nest Inside Other Tags In Xhtml?
Yes, In XHTML we will insert only certain tags inner different tags. Example:
<ol> Some my favored flowers are:
<li>lotus</li>
<li>lilly</li>
<li>sunflower</li>
and my maximum favored flower is:
<li>purple rose</li> </ol>
In the above instance we insert the paragraph among
<li> tag.It's wrong. In case of XHTML our example seems like that, becomes <p>
Some my preferred flora are:</p> <ol>
<li>lotus</li>
<li>lilly</li>
<li>sunflower</li>
<li>red rose</li>
</ol>
Q9. Can I Have Two Or More Actions In The Same Form?
No. A form need to have precisely one motion. However, the server-side (e.G., CGI) application that tactics your form submissions can carry out any variety of duties (e.G., updating a database, sending email, logging a traction) in reaction to a unmarried shape submission.
Q10. Is Xhtml Element Name Case Sensitive?
Yes, XHTML detail names are case touchy. All detail names have to be written in decrease case letters. Here are a few valid and invalid XHTML element names:
Valid name.
Invalid call, need to use lower case letters.
Invalid name, now not described via XHTML specification.
Invalid call, have to use decrease case letters.
Note to HTML document authors: HTML detail names are not case touchy. But XHTML detail names are case sensitive. If you are changing existing HTML documents to XHTML documents, you will get a plenty of syntax errors approximately upper case letters used in HTML tags.
Q11. In Xhtml Tags May Overlap Or Not?
In XHTML tags may not be overlapped.
Example: <em> emphasised textual content and <b>ambitious </em>text</b> We can use above example in XHTML like that, <em>emphasised text </em> is <b>formidable textual content</b>
Q12. How To Build A "hey World" Page. With Xhtml ?
"Hello World" Web web page code looks as if this:
<?Xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tritional//EN"
"http://www.W3.Org/TR/xhtml1/DTD/xhtml1-tritional.Dtd">
<html xml:lang="en" lang="en" xmlns="http://www.W3.Org/1999/xhtml">
<head>
<title>Hello World</title>
</head>
<body>
<p>My first Web web page.</p>
</body>
</html>
Q13. How Is Xhtml Better Than Html? Why Would You Want To Use Xhtml?
So one can take benefit of new coding techniques
problems with the sooner versions have been fixed.
XHTML is a fairly near replica of HTML 4.01.
Extensibility : Under HTML, the addition of a brand new organization of elements calls for alteration of the whole DTD. XML substantially eases the mixing of new detail collections as it's far a subset of SGML itself and specifies it's own DTD.
Portability : By the yr 2002 as much as 75% of Internet get admission to may be completed on non-PC structures such as palm computer systems, televisions, fridges, vehicles, phones, and so forth. In most cases these devices will no longer have the computing power of a computing device laptop, and will not be designed to deal with sick-shaped HTML as do present day browsers.
Currently, the Netscape browser enables substantially for testing internet pages by means of displaying clean or broken pages whilst it comes across sloppy coding. IE is the maximum forgiving browser and will display nearly any web page regardless of the quantity of coding errors. While HTML itself is not completely missing in extensibility or portability but the evolution of it's been extraordinarily sluggish as compared to the tempo of Internet development. This fuels the issues encountered trying to make your pages work on a wide variety of browsers and structures. XHTML will assist to remedy those problems.
Q14. What Is Xhtml Validation?
XHTML validation is the process of validating XHTML record with w3c’s validator
Q15. How Is Xhtml Better Than Html?
The following are the reasons for why XTML is better than HTML:
XHTML uses fashion sheets as opposed to font, coloration and alignment tags of HTML.
XHTML allows to fashion sheets and scripts embedding in CDATA section.
XML of XHTML eases the mixing of latest elements as subsets of SGML.
Portable – Non-laptop platforms can be accessed with XHTML.
Q16. How To Enter Element Content?
Most of XHML factors allow you to specify contents. But there are some XHTML elements that do not permit any contents. If an XHTML element does allow element content, you want to go into the content between the hole tag and the final tag.
Here are some top examples of XHTML factors with contents:
<title>My First XHTML Document</title>
<p>A very lengthy paragraph…</p>
<h1>XHTML Tutorials by questionsinterviews.Com/html</h1>
Q17. What The Benefits Of Xhtml Are?
As XHTML is an XML utility, you will gain from trends within the XML world. For instance XML equipment including editors, converters, browsers, etc. May be used with XHTML resources. In addition there are developments to the XML family of protocols and codecs with a view to provide additional functionality for XHTML.
Q18. How You Define Index Document?
Many times we have require index.Htm / report because it is a preferred for the host-server to look for the record and deploy it.Default file to be displayed within the internet.
Q19. What Is The Relation Between Xhtml And Http?
HTTP (HyperText Trfer Protocol) is an Internet conversation protocol, that allows a viewer’s computer speaking to a writer’s laptop to fetch XHTML files. The viewer’s pc problems a HTTP request message to the publisher computer first. Then the publisher returns a HTTP reaction message lower back to the viewer’s computer with the asked XHTML document protected in the message.
Q20. What Is The Relation Between Xhtml And Css?
CSS (Cascading Style Sheets) is a technical specification that allows XHTML record authors to attach formatting fashion sheets to XHTML documents. When XHTML files are viewed as Web pages via Web browsers, the connected style sheets will adjust the default fashion sheets embedded in browsers.
Q21. What Is Xhtml Modularization?
The XHTML modularization version defines the modules of XHTML.
XHTML is a simple, but big language. XHTML carries maximum of the capability an internet developer will want.
For a few purposes XHTML is simply too massive and complex, and for different purposes it is an awful lot too simple.
By splitting XHTML into modules, the W3C (World Wide web Consortium) has created small and well-defined units of XHTML factors that can be used separately for simple gadgets in addition to mixed with different XML standards into large and extra complex packages.
Q22. Why Do We Need Modular Dtds?
An software may additionally wish to guide most effective a subset of XHTML. For example a mobile telephone, an Internet TV or maybe a Web-conscious cooker may additionally only require a subset of XHTML. Also modularity makes it less complicated to install new traits.
Q23. Xhtml Should Be The Master Storage Format For My Resources?
NO! XHTML nevertheless lacks semantics. Ideally your sources ought to be stored in the precise XML format. XSLT can then be used to transform the assets to XHTML (for Web browsers), WML (for mobile phones), and so forth. XHTML is a beneficial intermediate level.
Q24. Differences Between Xml And Html
Since XML and HTML are derived from SGML they're comparable, but have the subsequent variations:
@XML is case-touchy.
@XML need to have fees (single or double) around attributes.
@Most interpreters of HTML are very forgiving about missing give up tags – XML parses aren't.
@Comments begin with <– and end with –>. Inside a comment, "–" won't appear. Although this is fine in html, it confuses xml parsers.
Q25. What Is The Relation Between Xhtml And The Web?
The Web is a writer era based totally at the Internet to permit publishers to put up hyper related documents to be considered through Internet users. XHTML is the subsequent era language that used to compose the ones hyper related files. In another phrase, XHTML is the technical language that controls Web web page contents and hyper hyperlinks.
Q26. Can We Get Down To Practicalities. How Do I Create Xhtml Pages?
The eGroups XHTML-L Web website provides links to XHTML equipment, inclusive of conversion tools and editors. A couple of free tools are to be had (HTML-Kit, 1st Page 2000). Mozquito Factory seems to be the first certified package deal in the marketplace. You can assume the same old suspects (Microsoft, Dreamweaver, and so on) to carry out new variations in their products with XHTML aid.
Q27. Do I Have To Memorize A Bunch Of Tags?
No. Most programs that help you write HTML code already recognize most tags, and create them while you press a button. But you must recognize what a tag is, and how it works. That manner you can correct errors for your web page extra without problems.
Q28. Who Developed Xhtml?
XHTML became advanced through W3C HTML Working Group with Steven Pemberton as the organization chair.
Q29. What Is A Tag?
In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for plenty motives — to exchange the appearance of textual content, to expose a picture, or to make a link to any other web page.
Q30. Attributes Values Must Be In Double Or Single Quotes
<ol type=1>
becomes
<ol type="1">
or
<ol type='1'>
Q31. What's About An Assumption With Xhtml?
Serving XHTML with a MIME kind of textual content/html is inaccurate.
The whole point of XHTML is that it’s XML so you can advantage from namespaces and so forth.
In unique, ‘textual content/html’ is NOT suitable for XHTML Family file sorts that provides elements and attributes from overseas namespaces, including XHTML+MathML [XHTML+MathML].
Two selections:
@XHTML 1.Zero served as software/xhtml+xml to conforming UAs, and textual content/html to Internet Explorer
@HTML four.01, served as text/html
XHTML 1.1 isn't an choice because it mandates a MIME kind of software/xhtml+xml that is incompatible with Internet Explorer
Q32. What Is Xhtml Modularization? Why Xhtml Modularization?
The decomposition of XHTML and via reference HTML into a set of modules which are summary to provide modularity is known as XHTML modularization. These modules are applied within the XML document type definition language. The rules had to define the abstract version uses XML DTD.
Modularization of XHTML refers to specify nicely described set of XHTML elements which can be compiled and prolonged by way of the XHTML document developers, other XML requirements specifications.
Modularization of XTML acts as a me for the designers of product for specifying the factors that supports a particular devise via the use of trendy constructing blocks and general methods for constructing blocks utilization. The content material network receives “factors of conformance” through using these modules.
Q33. Write Some Useful Table Tags That We Use In Html?
I have display the listing of some tags that we used in HTML desk.These tags are:
<table> : This is started tag of table.All different desk tags works internal this tag.
<th> : This is used to jot down header on desk.
<tr> : This is used to create row on desk.
<td> This is used to create desk cells.
<caption> : This is specifies the desk caption.
<colgroup> : Specifies the organization of columns in table.
<col> : Using then we are able to set the attribute price for one or extra columns in desk.
<thead> : This is used to set table head.
<tbody> : This is used to set desk frame.
<tfoot> : This is used to set table border.
Q34. How Can I Check For Errors?
HTML validators check HTML files in opposition to a formal definition of HTML syntax after which output a listing of mistakes. Validation is critical to provide the high-quality danger of correctness on unknown browsers (each current browsers that you haven't seen and destiny browsers that have not been written but).
HTML checkers (linters) are also useful. These packages take a look at documents for unique problems, along with a few resulting from invalid markup and others as a result of not unusual browser insects. Checkers may also skip some invalid documents, and they will fail some legitimate ones.
All validators are functionally equal; whilst their reporting styles may vary, they will discover the equal mistakes given equal enter. Different checkers are programmed to search for unique issues, so their reviews will range appreciably from each other. Also, a few programs which can be referred to as validators (e.G. The "CSE HTML Validator") are sincerely linters/checkers. They are still beneficial, however they must now not be burdened with real HTML validators.
When checking a domain for mistakes for the first time, it is frequently beneficial to become aware of common problems that arise again and again on your markup. Fix these issues everywhere they occur (with an automated procedure if possible), and then pass again to pick out and connect the final problems.
Link checkers comply with all the links on a website and document which of them are no longer functioning. CSS checkers file issues with CSS style sheets.
Q35. Tell Me How To Convert An Html Page Into Xhtml?
If we need to transform HTML pages into XHTML than you have to insert some strains on the beginning of file. <?Xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tritional//EN" "http://www.W3.Org/TR/xhtml1/DTD/xhtml1-tritional.Dtd">
<html xmlns="http://www.W3.Org/1999/xhtml" xml:lang="en" lang="en">
Q36. Why Is There Extra Space Before Or After My Table?
This is often as a result of invalid HTML syntax. Specifically, it's far often because of unfastened content inside the table (i.E., content that isn't always internal a TD or TH detail). There is no fashionable manner to address free content within a desk. Some browsers display all loose content before or after the desk. When the loose content carries only multiple line breaks or empty paragraphs, then those browsers will show all this empty area before or after the desk itself.
The solution is to repair the HTML syntax mistakes. All content within a table have to be inside a TD or TH element.
Q37. What Tools To Use To Write Xhtml Documents?
The fundamental tool you want to write XHTML documents is any text editor, like notepad on Windows machine, or vi on Unix system.If you are seeking out a few superior equipment to help you writing XHTML files, you may choose any individual from the subsequent 3 classes of XHTML editors:
Text based totally editor - Allows you to paintings on the textual content version of the XHTML document.
WYSIWYG editor - Allows you to paintings on the rendered model of the XHTML file.
Browser based editor - A WYSIWYG editor integrated into an current Web browser.
XHTML editors also can be loaded with additional functionalities to allow you work with other Web technologies like CSS and JavaScript, or post the XHTML documents in your Web server.
Q38. What Is The Relation Between Xhtml And Sgml?
SGML (Standard Generalized Markup Language) is a metalanguage wherein you possibly can outline markup languages, like HTML, for documents. SGML is a descendant of IBM’s Generalized Markup Language (GML), developed within the Sixties by using Charles Goldfarb, Edward Mosher and Raymond Lorie (whose surname initials also appear to be GML). XHTML is not immediately related to SGML. But it's miles in a roundabout way to SGML via HTML.
Q39. Why Is This Xslt Important?
Rather than manually creating WML markup, XSLT will permit XHTML files to be mechanically converted to WML.
Q40. How To Create Tables In Html?
We use <table> tag to create the desk in HTML. After creating an table we use <tr> tag to create the rows.And use <td> to create facts mobile on every row.These mobile can shop photographs,text,tables,list and many others.
Basic syntax to create an Table are given below:
<table border="1">
<tr>
<td>row 1, mobile 1</td>
<td>row 1, mobile 2</td>
<td>row 1, mobile 3</td>
</tr>
<tr>
<td>row 2, mobile 1</td>
<td>row 2, mobile 2</td>
<td>row 2, mobile three</td>
</tr>
</table>
Q41. How Comfortable Are You With Writing Html Entirely By Hand?
I don’t commonly use WYSIWYG. The most effective events when I do use Dreamweaver are after I want to draw some thing to see what it seems like, and then I’ll usually both take that layout and hand-regulate it or build it all another time from scratch in code. I actually have simply written my personal computer HTML IDE for Windows (it’s called Less Than Slash) with the intention of deploying it for use in web improvement education. If has integrated reference features, and will autocomplete code by parsing the DTD you specify inside the file. That is to say, the program doesn’t understand something about HTML until after it parses the HTML DTD you exact. This have to provide you with a few concept of my ability level with HTML.
Q42. How You Define Span In Html?
We use SPAN by using the usage of <SPAN> tag in HTML.Syntax:<SPAN>…………</SPAN>Used to highlightthe any coloration textual content, for including coloured text, for adding history picture to textual content. SPAN not a cause of line damage. It delimits text and the usage of them we can use fashion to the 'elemental' place with none damage in Text.
Example:
<p>
<span style="color:#FF0000;">
In this page we use span.
</span>
</p>
Q43. What Are The Advantages Of Xhtml?
Some essential advantage of XHTML are given under:
1.In XHTML we are able to use combined namespaces.
2.Paintings on XHTML is an awful lot easy than HTML.
3.When your record is not nicely shaped than it will without delay knowledgeable to you due to an error out of your UA in XHTML.
Q44. What Is Everyone Using To Write Html?
Everyone has a different preference for which tool works fine for them. Keep in mind that typically the less HTML the device calls for you to realize, the more serious the output of the HTML. In other phrases, you can constantly do it better by means of hand if you make the effort to learn a touch HTML.
Q45. Why To Use Xhtml?
Most of the web pages incorporate horrific HTML Combines the strengths of both XML and HTML.
XHTML is strict in defining the tags, like Properly nested factors.
All elements need to always be closed.
All factors have to be written in lower case.
Every XHTML report have to have one root detail.
Q46. Should I Use An Http Get Or Post For My Ajax Calls?
AJAX requests must use an HTTP GET request while retrieving statistics in which the facts will no longer alternate for a given request URL. An HTTP POST need to be used when nation is updated at the server. This is in step with HTTP idempotency pointers and is noticeably endorsed for a regular net utility architecture.
Q47. What Is Xhtml? Why Xhtml?
XHTML stands for Extensible Hypertext Markup Language. It is a aggregate of XML and HTML skills. XHTML can be viewed as intersection of HTML and XML in lots of elements.
Q48. What Is An Xhtml Element Attribute?
An detail characteristic is a predefined belongings approximately this element. Element attributes lets in you to provide extra statistics to the element. Most XHTML elements have some common attributes. But many XHTML factors have their very own specific attributes.
Here are a few exact examples of detail attributes:
<br/> – No attribute.
<script type=”text/javascript”> – One attribute: “type”.
<p class=”sideNote”> – One attribute: “elegance”.
<meta name=”Author” content=”interviews.Com”/> – Two attributes: <img src=”ggl.Gif” alt=”ggl”/> – Two attributes: “src” and “alt”.
Q49. How Can I Use Forms For Pull-down Navigation Menus?
There is no manner to try this in HTML most effective; some thing else have to technique the form. JavaScript processing will work best for readers with JavaScript-enabled browsers. CGI and different server-facet processing is dependable for human readers, but engines like google have troubles following any shape-based navigation.
