HTML Interview Questions and Answers Top 60

What is HTML, Exactly?

HTML Interview Questions and Answers – HyperText Markup Language (HTML) is the language of the World Wide Web and is known as the “language of the Internet.” Create and display Web pages using this standard text formatting language. The content and the tags that format it for display on web pages make up HTML documents.

2. What are tags?

HTML Interview Questions and Answers

It is necessary to format content by inserting it between HTML tags. You’ll notice that it employs both the minus and the plus symbols. A slash can also be used as a tag closing sign. For instance:



3. Is it true that all HTML tags are paired?

To put it another way, there are HTML tags that don’t require a closing tag to be used. The image> tag and br> tags are two examples.


4. What are some of the most commonly utilised lists in web page design?

You can use any or all of the following list kinds in your document:

in an alphabetical order

a list of no particular order

a glossary of terms

the menu

List of directories 

To create each of these list types, a distinct collection of tags is used.

HTML Interview Questions and Answers Latest

5. To add a remark to an HTML document, follow these steps.

To begin a comment in HTML, type “!–” and end it with “–>.” For instance:

This is an example of a comment:


The Weekend and Weekday Batch


6. Is it possible to see all of the character entities accurately on all platforms?

If the operating system on which the browser is running does not support certain character entities, then no, they will not be displayed. They are shown as boxes when that happens. HTML Interview Questions and Answers.


7. Where can I find out more information on image maps?

With the use of an image map, you may create hyperlinks to a plethora of various online pages. Shapes in photos that you want to include in an image mapping can be defined.


8. What are the benefits of reducing white space?

HTML Interview Questions and Answers

HTML Interview Questions and Answers

HTML Interview Questions and Answers, In HTML, white spaces are a sequence of space characters that are interpreted as a single space character. Lines of text can be indented without worrying about numerous spaces because the browser collapses them into a single space. This makes it possible for you to better organise the HTML code.


9. Does each attribute have a fixed set of values that it accepts?

In some cases, attribute values can only be set to a specific set of values. Any numerical value that indicates the amount of pixels for a size can be entered into the other properties. HTML Interview Questions and Answers.


10. What is the best way to add a copyright sign to a web page in your browser?

&copy; or & #169; can be used to insert the copyright symbol in an HTML file.


11. How do you link pieces of a page together?

HTML Interview Questions and Answers, The a> tag can be used to build links, and the number (#) sign can be used to reference those links. It is possible to have a single line of text that reads “BACK TO TOP,” which would connect to a bookmark named “topmost,” and which would appear on the page. A separate command like a name=”topmost”> is then placed anywhere on the same page so that when a user clicks “BACK TO TOP,” they will be taken back to that location.


12. Is there a way to maintain the order of list items in an HTML document?

Using indents can help you maintain the list items in order. Each subnested list can be identified at a glance if it is indented further than the parent list that includes it.


13. What is the URL of a web address that you see in a magazine pointing to?

Every web page can have its own unique URL. As a rule of thumb, the majority of these URLs are relative to the homepage. This is normally where the magazine’s published web address points. Access all other pages on the website from this one central location.


14. In picture mapping, what is the usage of alternate text?

If you’re utilising picture maps, it’s easy to become lost in the maze of hotspots that connect to different links. With alternative text, each hotspot link can have an illustrative description attached to it.


15. Is it possible to use older HTML files in newer browsers?

Do older HTML files comply with the current HTML specification?

However, some functions may not function properly in the newer browsers even if older files are still open.


The Weekend and Weekday Batch


16. Is a hyperlink limited to images or can it also be used in text?

No, text and picture hyperlinks can both be utilised. To put it another way, you can turn a picture into a link that users can click on to get to another page. The a href=” “>…/a> tag combinations should be used to surround the image.


17. How can a symbol be represented if the user’s operating system does not support it?

Using a picture instead of a character in circumstances when their operating system does not support that character is an option.


18. A list of numbers can’t be changed mid-list, how do you do it?

Type and value are the two attributes of the li> tag. The numbering type of any list item can be altered using the type property. The number index can be altered using the value attribute.


19. What exactly are style sheets?

HTML Interview Questions and Answers, Style sheets allow you to create style templates that are reusable, portable, and well-defined. Using these templates, multiple web pages may be linked together, making it simple to manage and update the appearance and feel of the site.


20. HTML has a variety of bullet kinds.

A variety of list kinds are available when using ordered lists, including alphabetical and Roman numerals. Unordered lists can have their type property set to disc, square, or circle.


21. 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 color. You can use this tag combination as many times as needed, surrounding a single character or an entire word.


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


23. Write an HTML table tag sequence that outputs the following:

50 pcs 100 500

10 pcs 5 50



<td>50 pcs</td>





<td>10 pcs</td>






24. What is the advantage of grouping several checkboxes together?

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


25. 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 find this problem when the text does not display properly on the browser screen.


26. What are applets?

Applets are small programs that can be embedded within web pages to perform some specific functionality, such as computations, animations, and information processing. Applets are written using the Java language.


27. What if there is no text between the tags or if a text was omitted by mistake? Will it affect the display of the HTML file?

If there is no text between the tags, then there is nothing to format. Therefore no formatting will appear. Some tags, especially tags without a closing tag like the <img> tag, do not require any text between them.


28. Is it possible to set specific colors for table borders?

You can specify a border color using style sheets, but the colors for a table that does not use style sheets will be the same as the text color.


29. How do you create a link that will connect to another web page when clicked?

To create hyperlinks, or links that connect to another web page, use the href tag. The general format for this is: <a href=”site”>text</a>

Replace “site” with the actual page URL that is supposed to be linked to when the text is clicked.


30. What other ways can be used to align images and wrap text?

Tables can be used to position text and images. Another useful way to wrap text around an image is to use style sheets.


31. Can two different web pages be accessed via the same text link?

No. a> tags can only accept one href attribute, and that only points to one web page.


32. The unordered list differs from the directory and menu listings.

Directory and menu lists don’t have the ability to change the bullet style, therefore this is the main difference.


33. Can the colour of the bullets be altered?

The colour of the list item’s first character is used as the background colour for the bullets. It is possible to change the colour of the bullets and the initial character by putting a group of font> tags around them that have the colour property set. HTML Interview Questions and Answers.


34. What is the maximum text field size allowed?

A text field’s default size is around 13 characters. The size attribute, on the other hand, allows you to set the size value as low as 1. The browser width will decide the maximum file size. The default size of 13 characters will be used if the size property is set to zero.


35. Does the use of the th> tag necessitate the beginning of a row or column?

You can modify any tr> to a th> tag. The th> tag’s text will seem bold in the browser as a result of this. Although th> tags are commonly associated with headings, this is not the only place where they can be found.



The Weekend and Weekday Batch


37. Why do border and rule attribute have a relationship?

It is possible to override the default cell boundaries by setting the border attribute to something other than zero. A 1-pixel border appears when the border attribute is not included in a table> tag, even when the rules attribute is added.


38. What is a marquee, and how does it differ from a billboard?

Using a marquee, you may add scrolling text to your website. Use a marquee> and a _marquee> tag to put the text you wish to appear scrolling into position.

Clicking on content on a webpage will send you an email; how do you do this?

The mailto command within the href tag can be used to turn a piece of text into a link that can be clicked to send an email. This is how it’s done:

to the following address: “youremailaddress”

/A> text that can be clicked


39. Is there any other way to divide paragraphs of content without using br> tags?

No. Line breaks can be achieved in a variety of ways, not just with the br> tag. In addition to the p tag and the blockquote> tag, various other tags are used to separate portions of content.


40. There may be cases where the text appears outside of the browser, but this is not guaranteed.

The text is automatically wrapped to fit the browser window by default. A table cell with a specified width could contain content that extends outside of the browser window. HTML Interview Questions and Answers.


41. What distinguishes active links from regular links?

Blue is the default colour for links that are both normal and active. For example, some browsers are aware of active links only when a mouse pointer is hovering over them; others are aware of them if they are clicked. A regular link is one that does not have a mouse cursor over it.


42. Does the amount of new style definitions that can be inserted in the brackets of a style sheet have a limit?

A selection can have as many style definitions as it wants in its brackets because style sheets have no such restriction. However, a semicolon must be used to separate each new definition of a style.


43. The answer to this question is yes, you can use fractional weight numbers such as 670 or 973.

The standard doesn’t allow for fractional weight values to be implemented, however the implementation primarily depends on the browser. The last two digits of any valid value must be zero.


44. When it comes to style sheets, what is the hierarchy that is being followed?

For example, if a single selector contains three definitions, the definition that is closest to the actual tag is taken into consideration. External style sheets have precedence over embedded style sheets, with inline style having the upper hand.


45. Is it possible to put together selectors with class names?

Using commas to separate selector definitions makes it possible to use the same style definition for many selectors. Selectors with class names can likewise benefit from this method.


The Weekend and Weekday Batch


46. Open the external CSS file in a browser to see what occurs.

Browsers can’t open the external CSS file since it has a different extension when you try to open it. The only way to use an external CSS file is to use the link/> tag in another HTML page to point to the external CSS file.

If you want to use a picture as a web page background, here’s how to do it:

After the /head> tag, add the following tag code:


47. Image.gif is used as the body’s background.

Image.gif can be substituted for any filename of your choice. Your web page’s background image will be replaced with the image you’ve selected.


48. A non-list element, such as a paragraph, can’t have the list-style-type property applied to it.

In paragraphs, the list-style-type property has no effect because the paragraph is a non-list element.


49. When should frames be used?

Framing a website can make it a lot easier to navigate. While browsing, the key links to the site can be found in a frame at the very top or very bottom of your browser window, allowing the rest of your browser window to display their content. HTML Interview Questions and Answers.


50. Do you get an error if you don’t have enough values in the rows or columns attribute?

According on the overall sum of data, the browser calculates the frame size. With a cols value of 100% or 200 percent, the browser shows two frames, the second of which is twice as large.


51. Which browsers are capable of displaying HTML5 content?

Most HTML5 features are supported by the most recent versions of Google Chrome, Apple Safari, Mozilla Firefox, and Opera.


52. Name two new tags that were added to the HTML 5 specification.

In HTML5, there are two new tags: Video> and Audio>. To play multimedia content, they are mostly utilised as a replacement for Flash, Silverlight, and other related technologies


53. Which two semantic tags have been incorporated into HTML5?

These two new tags were added to HTML5 as part of the article> and section> tags. Sections can include numerous articles, and each section can have multiple articles. A section of a larger whole is represented by an article tag.


54. In HTML5, what does it mean to use a figure> tag?

This tag is used to identify a portion of flow content that is self-contained. In the majority of cases, it is utilised as a stand-alone unit to refer back to the overall flow of the document.

Can you tell me more about the Canvas element?

Bypassing Photoshop, the canvas element makes it possible to create 2D pictures directly with HTML5 code.



The Weekend and Weekday Batch


56. In HTML5, what are the new FORM elements?

HTML5’s new Form components offer far more functionality than their predecessors.

These functions can be performed using the following tags:

This tag specifies a list of alternatives for input controls, such as a drop-down menu or checkbox.

2) keygen> – A key-pair generator field is represented by this tag.

If a programming computation results in an output, this is what it looks like.

Why is HTML5 Web Storage Beneficial?


57. HTML5 Web Storage offers the following two advantages:

More data can be stored in it than in cookies (up to 10 MB).

In order to move data from a web storage account, an HTTP request must be made. It aids in enhancing the application’s speed.


58. In HTML5, there are two different forms of web storage.

HTML5 supports two methods of data storage:

Keeping Track of Session Information:

Only the current session’s data is saved. This implies that when the browser is closed, the data kept in session storage is automatically cleared.


59. Storage on a Personal Computer (PC):

There are two different types of storage available in HTML5: local storage and web storage. When a browser window is closed, data stored locally is not automatically removed.

How and why does HTML5 make use of the Application Cache?

The term “Application Cache” refers to the idea of caching a web application. It does not require an internet connection to use.


60. A few benefits of Application Cache include:.

Web users can access the programme even when they are not connected to the Internet.

Loading time of cached resources is faster

Web browsers will only download resources that have been updated, reducing server load.

What are the five new HTML5 input formats for forms?

HTML5 introduces the following new data types, HTML Interview Questions and Answers.

The date can be selected by the user.

New HTML Interview Questions and Answers

With this input type, a date and time can be entered without regard to the user’s locale.

user can select a date and time with time zone by using this input type.

a month and a year can be selected by the user

an e-mail address was ever entered into one of these input fields. HTML Interview Questions and Answers.


We are providing Latest Government Jobs, Marketing Jobs, HTML Interview Questions and Answers, Online Apply, jobs in Pakistan, Medical Department, online jobs in Pakistan, Lesco Wapda, Pepco, PAF Jobs, Pak Army Jobs, Pak Navy, PPSC, FPSC, NTS,  PTS, Punjab Police Department,  HTML Interview Questions and Answers, Atomic Energy, Banking, Medical, HTML Interview Questions and Answers.Teaching Jobs. 

Disclaimer: Before you apply for a job or give an advance to a like officer, confirm everything. We are not liable for any damage or loss.

Join WhatsApp Group Link for Jobs and Admissions

You might also like
Leave A Reply

Your email address will not be published.