Subscribe For Free Updates!

We'll not spam mate! We promise.

Tuesday, 7 October 2014

HTML Interview Questions and Answers

Best HTML Interview Questions and Answers:

What is HTML?

HTML is short for HyperText Markup Language, and is the language of the World Wide Web. It is the standard text formatting language used for creating and displaying pages on the Web. HTML documents are made up of two things: the content and the tags that formats it for proper display on pages.


What are tags?

Content is placed in between HTML tags 0in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol (>).

Do all HTML tags come in pair?

No, there are single HTML tags that does not need a closing tag. Examples are the img tag and br tags.

What are some of the common lists that can be used when designing a page?

You can insert any or a combination of the following list types:

  • ordered list
  • unordered list
  • definition list
  • menu list
  • directory list
What is contained in HTML markup?

It consists of :

  • Character-based data types
  • Several key components, including elements (and their attributes)
  • Character references and entity references.
  • Also the document type declaration.
What is body in HTML document?

The body element defines the documents' body. It contains all the contents of the document (like text, images, colors, graphics, etc.).

What is the difference between HTML elements and tags? 

HTML elements communicate to the browser how to render text. When surrounded by angular brackets <> they form HTML tags. For the most part, tags come in pairs and surround text.

What is head in HTML document?

The head of an HTML document is an unordered collection of information about the document. The HEAD contains general information, or meta-information, about the document. The head appears first in a document above the BODY.

What does DOCTYPE mean?

 The term DOCTYPE tells the browser which type of HTML is used on a webpage. In turn, the browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE or using a wrong DOCTYPE may load your page in Quirks Mode. 


What’s the difference between standards mode and quirks mode?

 Quirks Mode is a default compatibility mode and may be different from browser to browser, which may result to a lack of consistency in appearance from browser to browser.

Do all character entities display properly on all systems?

No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.

What is image map?

Image map lets you link to many different web pages using a single image. You can define shapes in images that you want to make part of an image mapping.

What is the advantage of collapsing white space?

White spaces are blank sequence of space characters, which is actually treated as a single space character in html. Because the browser collapses multiple space into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the html code into a much more readable format.

Can attribute values be set to anything or are there specific values that they accept?

Some attribute values can be set to only predefined values. Other attributes can accept any numerical value that represents the number of pixels for a size.

How do you insert a copyright symbol on a browser page?

To insert the copyright symbol, you need to type © or & #169; in an HTML file.


Is there any way to keep list elements straight in an html file?

By using indents, you can keep the list elements straight. If you indent each subnested list in further than the parent list that contains it, you can at a glance determine the various lists and the elements that it contains.

If you see a web address on a magazine, to which web page does it point?

Every web page on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within magazines typically points this top-most page. From this top level page, you can access all other pages within the web site.

What is the use of using alternative text in image mapping?

When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.

Do older html files work on newer browsers?

Yes, older html files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.

Does a hyperlink apply to text only?

No, hyperlinks can be used on text as well as images. That means you can convert an image into a link that will allow user to link to another page when clicked.

If the user’s operating system does not support the needed character, how can the symbol be represented?

In cases wherein their operating system does not support a particular character, it is still possible to display that character by showing it as an image instead.

How do you change the number type in the middle of a list?

The "li" tag includes two attributes – type and value. The type attribute can be used to change the numbering type for any list item. The value attribute can change the number index.

What are style sheets?

Style sheets enable you to build consistent, transportable, and well-defined style templates. These templates can be linked to several different web pages, making it easy to maintain and change the look and feel of all the web pages within a site.

What bullet types are available?

With ordered lists, you can select to use a number of different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.

How do you create multicolored text in a webpage?

To create text with different colors, use the font tags for every character that you want to apply a color. You can use this tag combination as many times as needed, surrounding a single character or an entire word.

Why are there both numerical and named character entity values?

The numerical values are taken from the ASCII values for the various characters, but these can be difficult to remember. Because of this, named character entity values were created to make it easier for web page designers to use.

What is the advantage of grouping several check boxes together?

Although checkboxes don’t affect one another, grouping checkboxes together helps to organize them. Checkbox buttons can have their own name and do not need to belong to a group. A single web page can have many different groups of checkboxes.

What will happen if you overlap sets of tags?

If two sets of html tags are overlapped, only the first tag will be recognized. You will recognize this problem when the text does not display properly on the browser screen.

What are the limitations when serving XHTML pages?

Perhaps the biggest issue is the poor browser support XHTML currently enjoys. Internet Explorer and a number of other user agents cannot parse XHTML as XML. Thus, it is not the extensible language it was promised to be. There are many other issues. Take your pick.

What is the syntax difference between a bulleted list and numbered list?

Bulleted lists use the "ul" tag, which stands for “unordered,” whereas "ol" is used to create an ordered list.

What is the difference between "div" and "frame" tags?

A div tag is a generic container element for grouping and styling, whereas a frame tag creates divisions within a web page and should be used within the frameset tag. The use of frame and frameset are no longer popular and are now being replaced with the more flexible iframe, which has become popular for embedding foreign elements (ie. Youtube videos) into a page.

What are the reasons for validating a HTML?

To ensure one shared HTML coding standard in the World Wide WebTo ensure smooth spiderability of the HTML pageTo ensure better positioning of the HTML in Search Engines

What is span in HTML?

The SPAN is used for highlighting text of any color desired, for adding colored text, for adding background image to text. SPAN doesn't cause a line break. It delimits text and it allows styles to be applied to a 'elemental' region, or for the 'elemental' region to be identified, without causing a break in the text flow.



Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments:

Post a Comment