Q. What is HTML?
Ans : HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web. It makes the text more interactive and dynamic. It can turn text into images, tables, links. More details.
Q. What are Tags?
Ans : HTML tags are composed of three things: an opening tag, content and ending tag. Some tags are unclosed tags.
HTML documents contain two things:
content, and
tags
When a web browser reads an HTML document, the browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.
Syntax
<tag> content </tag>
Content is placed between tags to display data on the web page.+
More details.
Q. Do all HTML tags have an end tag?
Ans : No. There are some HTML tags that don't need a closing tag. For example: <image> tag, <br> tag. More details.
Q. What is formatting in HTML?
Ans : The HTML formatting is a process of format the text for a better look and feel. It uses different tags to make text bold, italicized, underlined. More details.
Q. How many types of heading does an HTML contain?
Ans : The HTML contains six types of headings which are defined with the <h1> to <h6> tags. Each type of heading tag displays different text size from another. So, <h1> is the largest heading tag and <h6> is the smallest one. For example:
<h1>Heading no. 1</h1>
<h2>Heading no. 2</h2>
<h3>Heading no. 3</h3>
<h4>Heading no. 4</h4>
<h5>Heading no. 5</h5>
<h6>Heading no. 6</h6>
More details.
Q. How to create a hyperlink in HTML?
Ans : The HTML provides an anchor tag to create a hyperlink that links one page to another page. These tags can appear in any of the following ways:
Unvisited link - It is displayed, underlined and blue.
Visited link - It is displayed, underlined and purple.
Active link - It is displayed, underlined and red.
More details.
Q. Which HTML tag is used to display the data in the tabular form?
Ans : The HTML table tag is used to display data in tabular form (row * column). It also manages the layout of the page, e.g., header section, navigation bar, body content, footer section. Here is the list of tags used while displaying the data in the tabular form:
Tag Description
<table> It defines a table.
<tr> It defines a row in a table.
<th> It defines a header cell in a table.
<td> It defines a cell in a table.
<caption> It defines the table caption.
<colgroup> It specifies a group of one or more columns in a table for formatting.
<col> It is used with <colgroup> element to specify column properties for each column.
<tbody> It is used to group the body content in a table.
<thead> It is used to group the header content in a table.
<tfooter> It is used to group the footer content in a table.
Q. What are some common lists that are used when designing a page?
Ans : There are many common lists which are used to design a page. You can choose any or a combination of the following list types:
Ordered list - The ordered list displays elements in numbered format. It is represented by <ol> tag.
Unordered list - The unordered list displays elements in bulleted format. It is represented by <ul> tag.
Definition list - The definition list displays elements in definition form like in dictionary. The <dl>, <dt> and <dd> tags are used to define description list.
More details.
Q. What is the difference between HTML elements and tags?
Ans : HTML elements communicate to the browser to render text. When the elements are enclosed by brackets <>, they form HTML tags. Most of the time, tags come in a pair and surround content.
Q. What is semantic HTML?
Ans : Semantic HTML is a coding style. It is the use of HTML markup to reinforce the semantics or meaning of the content. For example: In semantic HTML <b> </b> tag is not used for bold statement as well as <i> </i> tag is used for italic. Instead of these we use <strong></strong> and <em></em> tags.
Q. What is an image map?
Ans : Image map facilitates you to link many different web pages using a single image. It is represented by <map> tag. You can define shapes in images that you want to make part of an image mapping.
Q. How to insert a copyright symbol on a browser page?
Ans : You can insert a copyright symbol by using © or © in an HTML file.
Q. What is a style sheet?
Ans : A style sheet is used to build a consistent, transportable, and well-designed style template. You can add these templates on several different web pages. It describes the look and formatting of a document written in markup language.
Q. Can you create a multi-colored text on a web page?
Ans : Yes. To create a multicolor text on a web page you can use <font color ="color"> </font> for the specific texts you want to color.
Q. Is it possible to change the color of the bullet?
Ans : The color of the bullet is always the color of the first text of the list. So, if you want to change the color of the bullet, you must change the color of the text.
Q. Explain what are the key responsibilities of a Web Developer?
Ans : Program test and debug all web applications
Design, develop, test and deploy web applications
Uploading sites onto server and registering it with different search engines
Coordinate with other designers and programmers to develop web projects
Fix bugs, troubleshoot and resolve problems
In case of system failure initiate periodic testing and implement contingency plans
Develop appropriate code structures to solve specific tasks
Support and assist in the upkeep and maintenance of websites
Assume ownership of code throughout staging, development, testing and production
Q. What web developer should know?
Ans : A good web developer should know
HTML
CSS
SQL
PHP/Ruby/Python
JQuery
JavaScript
Q. Explain what is CORS? How does it work?
Ans : (CORS) Cross-Origin Resource Sharing is a mechanism that enables many resources (e.g., JavaScript, fonts etc.) on a web page to be requested from another domain outside the domain from which the resource originated. It is a mechanism supported in HTML5 that manages XMLHttpRequest access to a domain different.
Q. What are some of the types of CSS that are used?
Ans : There are three main types of CSS present:
Inline CSS: Supports the addition of CSS inline, alongside HTML elements
External CSS: Used to import an external CSS file to the HTML document
Embedded CSS: Used to add CSS styles by making use of the <style> attribute
Q. What is the use of a selector in CSS?
Ans :A CSS selector is used with a rule in the inline elements, which require styling. With the help of selectors, it is easy to find and select HTML elements based on factors, such as name, ID, attribute, etc.
Q. an you give an example of using an ID selector in CSS?
Ans : The ID selector is used in CSS to point to a target element for usage. It is denoted in the following example:
#example {padding: 20px;}
<p id="SelectorExample">
...
</p>
Q. What is the use of grouping in CSS3?
Ans : Grouping is used in CSS3 to give users the ability to reuse and apply the same CSS style element to multiple HTML entities, using just one single declaration statement.
A simple example of grouping is as shown below:
#grouped g, ul { padding-top: 20px; margin: 1; }
Q. What is the use of a class selector in CSS?
Ans : Class selectors in CSS begin with a “.” (period) key and are followed by the name of the class. It is used to select a statement and modify the style of that element in the corresponding part of the HTML tag.
Consider the following example:
.exampleclass {font-family: TimesNewRomanl; font-size: 20; background: red;}
<div class="sampleclass">
...
</div>
Next up on these web technologies interview questions, let us understand a little about the use of Webkit.
Q. What is the use of Webkit in CSS3?
Ans : Webkit is an important software component in CSS that allows for the easy rendering of HTML and CSS elements in a variety of browsers, such as Chrome, Firefox, and Safari.
There are many engines for browsers such as:
Gecko for Mozilla
Presto for Opera
Edge for Internet Explorer
Q. What are the uses of child selectors in CSS?
Ans : Child selectors are primarily used in CSS to look up for the ‘child’ component of an element in CSS.
Consider an example where the <ul> tag is used in a paragraph. Then, the ‘ul’ tag becomes a child of the paragraph element. To implement this in CSS, the following syntax is used:
p > ul { font-size:20px; }
Q. What is head in HTML document?
Ans:
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.
Q. What is “Semantic HTML?”
Ans:
Semantic HTML is a coding style where the tags embody what the text is meant to convey.
In Semantic HTML, tags like < b> < /b> for bold, and < i> < /i> for italic should not be used, reason being they just represent formatting, and provide no indication of meaning or structure.
The semantically correct thing to do is use < strong> < /strong> and < em> < /em> .
These tags will have the same bold and italic effects, while demonstrating meaning and structure (emphasis in this case).
Q. What does DOCTYPE mean?
Ans:
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. See example:
Q. What’s the difference between standards mode and quirks mode?
Ans:
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.
Q. Do all character entities display properly on all systems?
Ans:
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.
Q. What is image map?
Ans:
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.
Q. What is the advantage of collapsing white space?
Ans:
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.
Q. Can attribute values be set to anything or are there specific values that they accept?
Ans:
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.
Q. How do you insert a copyright symbol on a browser page?
Ans:
To insert the copyright symbol, you need to type © or & #169; in an HTML file.
Q. Is there any way to keep list elements straight in an html file?
Ans:
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.
Q. If you see a web address on a magazine, to which web page does it point?
Ans:
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.
Q. What is the use of using alternative text in image mapping?
Ans:
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.
Q. Do older html files work on newer browsers?
Ans:
Yes, older html files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.
Q. Does a hyperlink apply to text only?
Ans:
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. Just surround the image within the < a href=” “> …< /a> tag combinations.
Q. What is CSS ?
Ans:
1. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. Every element type as well as every occurrence of a specific element within that type can be declared an unique style, e.g. margins, positioning, color or size.
2. CSS is a web standard that describes style for XML/HTML documents.
3. CSS is a language that adds style (colors, images, borders, margins…) to your site. It’s really that simple. CSS is not used to put any content on your site, it’s just there to take the content you have and make it pretty. First thing you do is link a CSS-file to your HTML document.
Q. Is CSS case sensitive?
Ans:
Cascading Style Sheets (CSS) is not case sensitive.
However, font families, URLs to images, and other direct references with the style sheet may be.
The trick is that if you write a document using an XML declaration and an XHTML doctype, then the CSS class names will be case sensitive for some browsers.
Q. What is a class? What is an ID?
Ans:
A class is a style (i.e., a group of CSS attributes) that can be applied to one or more HTML elements.
This means it can apply to instances of the same element or instances of different elements to which the same style can be attached.
Classes are defined in CSS using a period followed by the class name.
It is applied to an HTML element via the class attribute and the class name.
The following snippet shows a class defined, and then it being applied to an HTML DIV element.
.test {font-family: Helvetica; font-size: 20; background: black;}
test
Also, you could define a style for all elements with a defined class. This is demonstrated with the following code that selects all P elements with the column class specified.
p.column {font-color: black;}
An ID selector is a name assigned to a specific style.
In turn, it can be associated with one HTML element with the assigned ID.
Within CSS, ID selectors are defined with the # character followed by the selector name.
The following snippet shows the CSS example1 defined followed by the use of an HTML element’s ID attribute, which pairs it with the CSS selector.
#example1: {background: blue;}
Q. What are properties of style sheet ?
Ans:
CSS Background
CSS Text
CSS Font
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS List
CSS Table
Q. What are the limitations of CSS ?
Ans:
Limitations are:
• Ascending by selectors is not possible
•Limitations of vertical control
•No expressions
•No column declaration
•Pseudo-class not controlled by dynamic behavior
•Rules, styles, targeting specific text not possible
0 Comments