Home / Question / Top 20 html interview questions and answers for freshers
HTML stands for Hyper Text Markup Language, and HTML is the most widely used language to write Web Pages. As its name suggests, HTML is a markup language.

Top 20 html interview questions and answers for freshers

HTML stands for Hyper Text Markup Language, and HTML is the most widely used language to write Web Pages. As its name suggests, HTML is a markup language.

Hypertext refers to the way in which Web pages (HTML documents) are linked together. When you click a link in a Web page, you are using hypertext.

HTML interview questions and answers for freshers

1) What is HTML?

HTML is short for Hyper Text 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 format it for proper display on pages.

2) What are tags?

Content is placed in between HTML tags in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol (>). A slash symbol is also used as a closing tag.

 For example:

<strong>sample</strong>

3) 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.

5) 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

Each of this list types makes use of a different tag set to compose

6) How do you insert a comment in html?

Comments in html begins with “<!–“nd ends with “–>”.

 For example:

<!– A SAMPLE COMMENT –>

7 ) 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.

8) 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.

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

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

10) How do you create links to sections within the same page?

Links can be created using the <a> tag, with referencing through the use of the number (#) symbol. For example, you can have one line as <a href=”#topmost”>BACK TO TOP</a>, which would result in the words “BACK TO TOP” appearing on the webpage and links to a bookmark named topmost. You then create a separate tag command like <a name=”topmost”> somewhere on the top of the same webpage so that the user will be linked to that spot when he clicked on “BACK TO TOP”.

11) 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.

12) 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.

13) 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.

14) 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.

15) 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. Just surround the image within the <a href=” “>…</a> tag combinations.

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

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

17) 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.

18) 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.

19) 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.

20) How do you create multicolored text in a webpage?

To create text with different colors, use the <font color=”color”>…</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.

About Chetan Kalbande

• Working knowledge in Magento, Wordpress, Joomla, PHP, HTML5, CSS3, Bootstrap front-end framework and Foundation front-end framework. Experience of PSD to HTML and HTML to Wordpress. Having knowledge on theme development of Wordpress, directory structure and responsive UI of Magento. E-Commerce development using Magento, Opencart, Woo-Commerce . Clean , attractive and responsive website development using Wordpress and Drupal. Estimation, design and development of various modules. Work on Search Engine Optimization to improve the search engine rank of website. Working knowledge and handling experience of Google Absence and different affiliates account. • Knowledge of Jquery Mobile, Android application development and Phone gap. Experience of Developing and maintaining web base portal or directory website. Work closely with the other team members to meet client goals. Promote on page SEO activities and also the interactions that build ranking, profile and traffic.

Check Also

Bing Ads

Bing Ads Accredited Professional Certificate exam question and answer

Bing Ads Editor allows you to work and make changes offline or online. True   ...

Leave a Reply