Interview Questions.

Top 100+ Html+xhtml Interview Questions And Answers

fluid

Top 100+ Html+xhtml Interview Questions And Answers

Question 1. What Is Xhtml? Why Xhtml?

Answer :

XHTML stands for Extensible Hypertext Markup Language. It is a mixture of XML and HTML talents. XHTML can be considered as intersection of HTML and XML in many aspects.

Question 2. Why To Use Xhtml?

Answer :

Most of the internet pages incorporate bad HTML Combines the strengths of each XML and HTML.
XHTML is strict in defining the tags, like Properly nested factors.
All elements must usually be closed.
All elements need to be written in decrease case. 
Every XHTML file must have one root detail.
XML Interview Questions
Question 3. Differences Between Xml And Html

Answer :

Since XML and HTML are derived from SGML they're comparable, but have the following differences:
1. XML is case-touchy.
2. XML have to have costs (unmarried or double) round attributes.
Three. Most interpreters of HTML are very forgiving about lacking end tags – XML parses are not.
Four. Comments start with <– and end with –>. Inside a remark, "–" won't appear. Although this is high-quality in html, it confuses xml parsers.

Question four. How Is Xhtml Better Than Html?

Answer :

The following are the motives for why XTML is better than HTML:

XHTML uses fashion sheets in preference to font, color and alignment tags of HTML.
XHTML lets in to fashion sheets and scripts embedding in CDATA phase.
XML of XHTML eases the mixing of new factors as subsets of SGML.
Portable – Non-laptop systems may be accessed with XHTML.
XML Tutorial
Question five. What Is Xhtml Modularization? Why Xhtml Modularization?

Answer :

The decomposition of XHTML and by way of reference HTML into a collection of modules which can be summary to offer modularity is referred to as XHTML modularization. These modules are applied within the XML file type definition language. The rules had to outline the summary model makes use of XML DTD.
Modularization of XHTML refers to specify nicely described set of XHTML elements which can be compiled and extended by means of the XHTML file developers, different XML requirements specifications.
Modularization of XTML acts as a means for the designers of product for specifying the factors that supports a specific devise through the usage of standard building blocks and standard techniques for constructing blocks usage. The content material community receives “points of conformance” by means of the usage of those modules.
HTML 4 Interview Questions
Question 6. What Is Xhtml Validation?

Answer :

XHTML validation is the procedure of validating XHTML document with w3c’s validator

Question 7. How Is Xhtml Better Than Html? Why Would You Want To Use Xhtml?

Answer :

so as to take advantage of new coding techniques
problems with the earlier variations had been fixed.
XHTML is a reasonably close replica of HTML four.01.

Extensibility : Under HTML, the addition of a brand new organization of factors requires alteration of the complete DTD. XML substantially eases the integration of recent element collections as it is a subset of SGML itself and specifies it's very own DTD.

Portability : By the year 2002 as a whole lot as 75% of Internet access could be performed on non-PC structures which include palm computers, televisions, fridges, vehicles, phones, and so forth. In most instances these devices will no longer have the computing strength of a computing device computer, and could now not be designed to house unwell-fashioned HTML as do contemporary browsers.

Currently, the Netscape browser enables substantially for trying out internet pages by using displaying clean or broken pages when it comes throughout sloppy coding. IE is the maximum forgiving browser and could show nearly any page irrespective of the volume of coding errors. While HTML itself isn't completely lacking in extensibility or portability but the evolution of it has been extraordinarily sluggish as compared to the tempo of Internet improvement. This fuels the problems encountered seeking to make your pages paintings on a wide variety of browsers and platforms. XHTML will assist to remedy the ones issues.

HTML 4 Tutorial HTML Interview Questions
Question 8. Is Is Right Only Certain Tags May Nest Inside Other Tags In Xhtml?

Answer :

Yes, In XHTML we can insert most effective positive tags inside different tags. Example:
<ol> Some my favourite flowers are: 
<li>lotus</li>
<li>lilly</li> 
<li>sunflower</li> 
and my most preferred flower is: 
<li>crimson rose</li> </ol> 
In the above instance we insert the paragraph between 
<li> tag.It's wrong. In case of XHTML our instance looks as if that, becomes <p>
Some my favored plants are:</p> <ol>
<li>lotus</li> 
<li>lilly</li> 
<li>sunflower</li> 
<li>purple rose</li>
</ol>

Question 9. In Xhtml Tags May Overlap Or Not?

Answer :

In XHTML tags may not be overlapped.
Example: <em> emphasised textual content and <b>ambitious </em>textual content</b> We can use above instance in XHTML like that, <em>emphasised text </em> is <b>formidable text</b>

HTML five Interview Questions
Question 10. Write Example That Shows Every Attribute Must Have A Value In Xhtml?

Answer :

Using instance I will show you in XHTML each characteristic should have a price.
Example in HTML:
<ol compact> <input type="radio" name="title" value="decline" checked>decline</input>
Below, I write a identical instance in XHTML. <ol compact="compact" > <input type="radio" name="title" value="decline" checked="checked">decline</input> In this we assign value compact, checked to detail compact and checked.

HTML Tutorial
Question 11. Why Is This Xslt Important?

Answer :

Rather than manually growing WML markup, XSLT will permit XHTML files to be robotically converted to WML.

HTML+Javascript Interview Questions
Question 12. Should I Use An Http Get Or Post For My Ajax Calls?

Answer :

AJAX requests ought to use an HTTP GET request while retrieving information wherein the records will no longer alternate for a given request URL. An HTTP POST ought to be used when state is up to date at the server. This is in line with HTTP idempotency tips and is especially recommended for a steady web utility architecture.

XML Interview Questions
Question 13. Tell Me How To Convert An Html Page Into Xhtml?

Answer :

If we want to transform HTML pages into XHTML than you have to insert a few traces at the beginning of report. <?Xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.W3.Org/TR/xhtml1/DTD/xhtml1-transitional.Dtd">
<html xmlns="http://www.W3.Org/1999/xhtml" xml:lang="en" lang="en">

HTML five Tutorial
Question 14. What Are The Advantages Of Xhtml?

Answer :

Some major gain of XHTML are given under:
1.In XHTML we will use combined namespaces.
2.Work on XHTML is lots simple than HTML.
3.When your document isn't always nicely formed than it's going to immediately knowledgeable to you due to an errors out of your UA in XHTML.

Question 15. What The Benefits Of Xhtml Are?

Answer :

As XHTML is an XML utility, you'll gain from tendencies inside the XML international. For example XML gear consisting of editors, converters, browsers, and many others. May be used with XHTML assets. In addition there are traits to the XML circle of relatives of protocols and codecs with a purpose to provide extra capability for XHTML.

HTML DOM Interview Questions
Question sixteen. How To Build A "hello World" Page. With Xhtml ?

Answer :

"Hello World" Web page code looks like this:
<?Xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.W3.Org/TR/xhtml1/DTD/xhtml1-transitional.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>


Java Tutorial
Question 17. Attributes Values Must Be In Double Or Single Quotes

Answer :

<ol type=1>
becomes
<ol type="1">
or
<ol type='1'>

Java Interview Questions
Question 18. Why Is There Extra Space Before Or After My Table?

Answer :

This is often caused by invalid HTML syntax. Specifically, it is frequently as a result of free content in the desk (i.E., content that isn't always inner a TD or TH detail). There isn't any fashionable way to handle loose content material inside a desk. Some browsers show all unfastened content earlier than or after the table. When the loose content material contains only more than one line breaks or empty paragraphs, then those browsers will show all this empty space before or after the table itself.

The answer is to fix the HTML syntax errors. All content within a table must be inside a TD or TH detail.

HTML four Interview Questions
Question 19. Do I Have To Memorize A Bunch Of Tags?

Answer :

No. Most applications that help you write HTML code already realize most tags, and create them whilst you press a button. But you have to understand what a tag is, and how it works. That way you may correct mistakes to your page greater without problems.

CSS Tutorial
Question 20. Can I Have Two Or More Actions In The Same Form?

Answer :

No. A shape need to have exactly one motion. However, the server-side (e.G., CGI) application that strategies your shape submissions can perform any quantity of tasks (e.G., updating a database, sending e-mail, logging a transaction) in response to a single shape submission.

CSS Interview Questions
Question 21. How Can I Use Forms For Pull-down Navigation Menus?

Answer :

There is no way to do this in HTML simplest; something else should process the shape. JavaScript processing will work most effective for readers with JavaScript-enabled browsers. CGI and other server-facet processing is reliable for human readers, however engines like google have issues following any form-primarily based navigation.

Question 22. How Can I Check For Errors?

Answer :

HTML validators take a look at HTML documents in opposition to a proper definition of HTML syntax after which output a listing of mistakes. Validation is crucial to provide the best chance of correctness on unknown browsers (each current browsers that you have not seen and future browsers that haven't been written but).
HTML checkers (linters) are also useful. These packages test documents for precise problems, which includes some as a result of invalid markup and others because of commonplace browser bugs. Checkers might also skip a few invalid files, and they will fail a few legitimate ones.
All validators are functionally equivalent; while their reporting patterns might also vary, they may find the identical mistakes given equal enter. Different checkers are programmed to look for special problems, so their reviews will range considerably from every different. Also, some programs that are referred to as validators (e.G. The "CSE HTML Validator") are truly linters/checkers. They are still useful, but they should now not be stressed with real HTML validators.
When checking a domain for errors for the first time, it's miles frequently useful to discover commonplace problems that arise time and again on your markup. Fix these issues everywhere they occur (with an automated method if feasible), and then move lower back to identify and fix the closing problems.
Link checkers comply with all the hyperlinks on a site and document which ones are now not functioning. CSS checkers document problems with CSS style sheets.
XHTML Tutorial
Question 23. How Do I Use Forms?

Answer :

The primary syntax for a shape is: <FORM ACTION="[URL]">…</FORM>
When the form is submitted, the form statistics is sent to the URL targeted in the ACTION characteristic. This URL should refer to a server-aspect (e.G., CGI) application in an effort to process the shape records. The shape itself ought to contain

 as a minimum one put up button (i.E., an <INPUT TYPE="submit" …> element),
 shape statistics factors (e.G., <INPUT>, <TEXTAREA>, and <SELECT>) as needed, and
 extra markup (e.G., identifying facts elements, supplying commands) as wanted.
Java Abstraction Interview Questions
Question 24. What Is A Doctype? Which One Do I Use?

Answer :

According to HTML standards, each HTML file begins with a DOCTYPE announcement that specifies which model of HTML the report uses. Originally, the DOCTYPE assertion turned into used simplest by using SGML-based totally equipment like HTML validators, which had to determine which model of HTML a document used (or claimed to use). Today, many browsers use the file's DOCTYPE announcement to decide whether or not to use a stricter, greater requirements-oriented layout mode, or to use a "quirks" layout mode that attempts to emulate older, buggy browsers.

HTML Interview Questions
Question 25. What Is Everyone Using To Write Html?

Answer :

Everyone has a exclusive preference for which device works fine for them. Keep in mind that usually the less HTML the device requires you to recognize, the more serious the output of the HTML. In different phrases, you could constantly do it higher through hand if you make the effort to research a touch HTML.

Question 26. What Is A Tag?

Answer :

In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for plenty reasons — to alternate the arrival of textual content, to expose a image, or to make a hyperlink to another page.

 

Dynamic HTML Interview Questions
Question 27. How Comfortable Are You With Writing Html Entirely By Hand?

Answer :

I don’t usually use WYSIWYG. The best occasions once I do use Dreamweaver are when I need to attract something to look what it looks as if, and then I’ll typically either take that layout and hand-alter it or construct all of it over again from scratch in code. I actually have certainly written my very own desktop HTML IDE for Windows (it’s called Less Than Slash) with the aim of deploying it for use in web development schooling. If has built-in reference capabilities, and could autocomplete code by using parsing the DTD you specify within the record. That is to mention, the program doesn’t realize some thing about HTML till after it parses the HTML DTD you certain. This have to provide you with some idea of my skill degree with HTML.

HTML five Interview Questions
Question 28. How To Create Tables In Html?

Answer :

We use <table> tag to create the table in HTML. After growing an desk we use <tr> tag to create the rows.And use <td> to create records cell on every row.These mobile can keep pictures,textual content,tables,list and so forth.
Basic syntax to create an Table are given below:
<table border="1">
<tr>
<td>row 1, mobile 1</td>
<td>row 1, cell 2</td>
<td>row 1, mobile three</td>
</tr>
<tr>
<td>row 2, mobile 1</td>
<td>row 2, mobile 2</td>
<td>row 2, cellular three</td>
</tr>
</table>

Question 29. Write Some Useful Table Tags That We Use In Html?

Answer :

I even have display the list of some tags that we utilized in HTML desk.These tags are:

<table>   :  This is commenced tag of table.All other desk tags works inner this tag.
<th>       : This is used to put in writing header on table.
<tr>        : This is used to create row on desk.
<td>     This is used to create table cells.
<caption> : This is specifies the table caption.
<colgroup> : Specifies the organization of columns in desk.
<col>     :  Using then we are able to set the characteristic cost for one or more columns in desk.
<thead>  : This is used to set desk head.
<tbody>  : This is used to set desk body.
<tfoot>  : This is used to set table border.
XHTML Interview Questions
Question 30. How You Use Form's Action Attribute And Submit Button In Html?

Answer :

Using Submit Button we will sends the form to the server and Action Attribute is specified that which document we ship.
<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 on the sumbit button internet web page than the submit_form is ship to the server.

Question 31. Xhtml Should Be The Master Storage Format For My Resources?

Answer :

NO! XHTML nonetheless lacks semantics. Ideally your assets have to be stored in the appropriate XML format. XSLT can then be used to transform the sources to XHTML (for Web browsers), WML (for cell phones), and many others. XHTML is a beneficial intermediate level.

Question 32. Can We Get Down To Practicalities. How Do I Create Xhtml Pages?

Answer :

The eGroups XHTML-L Web website online presents links to XHTML gear, which includes conversion equipment and editors. A couple of free gear are available (HTML-Kit, 1st Page 2000). Mozquito Factory appears to be the first licensed bundle available on the market. You can expect the same old suspects (Microsoft, Dreamweaver, and many others) to carry out new variations in their merchandise with XHTML support.

Question 33. What About Conversion Of Existing Html Pages – Especially Bulk Conversion, As I Have Many Thousands Of Html Files!

Answer :

W3C has written a utility application called Tidy which can be used to convert HTML pages to XHTML. Tidy can be used in batch mode to bulk-convert files. Tidy is an open source program, which has been included into an variety of authoring gear, most significantly HTML-Kit.

HTML+Javascript Interview Questions
Question 34. What Do You Understand About Doctype In Html?

Answer :

DOCTYPE is stands for Document Type Declaration.In an HTML each HTML report is commenced with DOCTYPE announcement.It may be fluctuate for specific versions 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">

Question 35. How You Define Index Document?

Answer :

Many instances we've got require index.Htm / document due to the fact it's miles a trendy for the host-server to search for the report and installation it.Default report to be displayed in the internet.

Question 36. How You Define Span In Html?

Answer :

We use SPAN by means of using <SPAN> tag in HTML.Syntax:<SPAN>…………</SPAN>Used to highlightthe any coloration text, for including coloured textual content, for including history picture to text. SPAN no longer a purpose of line destroy. It delimits text and the usage of them we will use style to the 'elemental' area with none ruin in Text.
Example:
<p>
<span style="color:#FF0000;">
In this page we use span.
</span>
</p>

HTML DOM Interview Questions
Question 37. What Is An Xhtml Element Attribute?

Answer :

An detail attribute is a predefined assets about this detail. Element attributes allows you to provide additional data to the element. Most XHTML factors have a few commonplace attributes. But many XHTML factors have their personal unique attributes.
Here are a few correct examples of detail attributes:

 <br/> – No attribute.
 <script type=”text/javascript”> – One attribute: “type”.
 <p class=”sideNote”> – One characteristic: “magnificence”.
 <meta name=”Author” content=”­interviews.Com”/> – Two attributes: <img src=”ggl.Gif” alt=”ggl”/> – Two attributes: “src” and “alt”. 
Question 38. Is Xhtml Element Name Case Sensitive?

Answer :

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 name, should use decrease case letters.
Invalid call, not described by XHTML specification.
Invalid name, have to use lower case letters.
Note to HTML file authors: HTML detail names aren't case sensitive. But XHTML detail names are case touchy. If you are changing present HTML documents to XHTML files, you will get a lots of syntax errors about upper case letters used in HTML tags.

Question 39. How To Enter Element Content?

Answer :

Most of XHML factors let you specify contents. But there are a few XHTML factors that don't permit any contents. If an XHTML detail does permit element content material, you want to enter the content material among the hole tag and the closing tag.
Here are some precise examples of XHTML factors with contents:

 <title>My First XHTML Document</title>
 <p>A very lengthy paragraph…</p>
 <h1>XHTML Tutorials via questions­interviews.Com/html</h1>
 

Question 40. Who Developed Xhtml?

Answer :

XHTML changed into advanced with the aid of W3C HTML Working Group with Steven Pemberton because the organization chair.

Java Interview Questions
Question forty one. How Many Tags Are Defined In Xhtml 1.0?

Answer :

There are seventy seven tags described in XHTML 1.Zero:

a abbr acronym deal with region b base bdo large blockquote body br button caption cite code col colgroup dd del dfn div dl dt em fieldset shape h1 h2 h3 h4 h5 h6 head hr html i img enter ins kbd label legend li link map meta noscript item ol optgroup option p param pre q samp script pick small span sturdy fashion sub sup desk tbody td textarea tfoot th thead identify tr tt ul var.

Question forty two. What Is The Relation Between Xhtml And Css?

Answer :

CSS (Cascading Style Sheets) is a technical specification that lets in XHTML report authors to attach formatting fashion sheets to XHTML files. When XHTML documents are viewed as Web pages via Web browsers, the connected fashion sheets will regulate the default fashion sheets embedded in browsers.

CSS Interview Questions
Question 43. What Is The Relation Between Xhtml And Sgml?

Answer :

SGML (Standard Generalized Markup Language) is a metalanguage wherein you can still outline markup languages, like HTML, for files. SGML is a descendant of IBM’s Generalized Markup Language (GML), developed within the 1960s by using Charles Goldfarb, Edward Mosher and Raymond Lorie (whose surname initials additionally appear to be GML). XHTML is not directly associated with SGML. But it is not directly to SGML through HTML.

Question 44. What Is The Relation Between Xhtml And Http?

Answer :

HTTP (Hyper­Text Transfer Protocol) is an Internet conversation protocol, that lets in a viewer’s computer talking to a writer’s computer to fetch XHTML files. The viewer’s computer problems a HTTP request message to the publisher computer first. Then the writer returns a HTTP response message again to the viewer’s computer with the requested XHTML file protected inside the message.

Question 45. What Is The Relation Between Xhtml And The Web?

Answer :

The Web is a writer era based at the Internet to permit publishers to publish hyper linked files to be regarded by using Internet customers. XHTML is the subsequent era language that used to compose the ones hyper linked documents. In every other word, XHTML is the technical language that controls Web page contents and hyper hyperlinks.

Question forty six. What Is Xhtml Modularization?

Answer :

The XHTML modularization model defines the modules of XHTML.
XHTML is a simple, however large language. XHTML incorporates most of the capability an internet developer will need.
For some functions XHTML is just too big and complex, and for different purposes it's far much too simple.
By splitting XHTML into modules, the W3C (World Wide net Consortium) has created small and nicely-defined units of XHTML factors that may be used one after the other for easy devices as well as blended with other XML requirements into large and extra complicated programs.
Question forty seven. Why Do We Need Modular Dtds?

Answer :

An application may additionally desire to aid best a subset of XHTML. For instance a cellular smartphone, an Internet TV or maybe a Web-aware cooker might also only require a subset of XHTML. Also modularity makes it less complicated to deploy new tendencies.

Question 48. What Tools To Use To Write Xhtml Documents?

Answer :

The basic device you need to jot down XHTML files is any textual content editor, like notepad on Windows device, or vi on Unix system.If you are seeking out some advanced tools to help you writing XHTML files, you can select anybody from the subsequent three classes of XHTML editors:

 Text primarily based editor - Allows you to work at the text version of the XHTML report.
 WYSIWYG editor - Allows you to work on the rendered model of the XHTML report.
 Browser primarily based editor - A WYSIWYG editor integrated into an current Web browser.
XHTML editors can also be loaded with additional functionalities to allow you work with other Web technologies like CSS and JavaScript, or post the XHTML documents for your Web server.

 

Question 49. How To Get Ready For Xhtml?

Answer :

XHTML is not very special from HTML four.01, so bringing your code as much as the 4.01 general is a great start. In addition, you should begin NOW to jot down your HTML code in lowercase letters. 

The Most Important Differences:

 XHTML elements should be nicely nested
 XHTML files need to be nicely-formed
 Tag names ought to be in lowercase
 All XHTML elements must be closed
Question 50. What's About An Assumption With Xhtml?

Answer :

Serving XHTML with a MIME sort of textual content/html is wrong.

The whole point of XHTML is that it’s XML so that you can benefit from namespaces etc.

In specific, ‘text/html’ is NOT appropriate for XHTML Family file kinds that provides factors and attributes from foreign namespaces, together with XHTML+MathML [XHTML+MathML].

Two picks:
1. XHTML 1.0 served as utility/xhtml+xml to conforming UAs, and textual content/html to Internet Explorer
2. HTML 4.01, served as textual content/html 
XHTML 1.1 isn't an option as it mandates a MIME type of software/xhtml+xml that's incompatible with Internet Explorer




CFG