HTML Designer

It is the most widely used language on Web to develop web pages. We have created a list for frequently asked Interview questions on HTML. The questions are really helpful if you are seeking to start your career in Web designing.

Q.1 Png files is stored in color modes of ?
8-BIT, 24-BIT, OR 32-BIT
Q.2 Add the appropriate code to turn the following text into an ordered list. My favorite fruits, in order of preference, are: Raspberries Strawberries Apples
    my favorite fruits, in order of preference, are:
  1. raspberries
  2. strawberries
  3. apples
Q.3 You created an unordered list with four list items. All the content following the fourth list item that should be normal text is indented under the list. What is the most likely cause of this problem?
A missing closing tag
Q.4 What is cascading?
Cascading is the process of providing various font name in the font-family property.
Q.5 What do you know about HTML?
HTML stands for Hypertext Markup Language. This is a documents’ markup language used for developing web pages in order for displaying them on the web browser. Extensions for saving HTML pages are “.htm or .html”.
Q.6 Define HTML Tags.
HTML tags are placed in the content and format the pages. They are always specified between (<) and (>) symbols. For example, <h1>text</h1>.
In this, an opening tag must be introduced with a closing tag and indicated with a ‘/’ symbol. Further, tags are used for changing the appearance of text, displaying a graphic, or linking another page.
Q.7 Explain the difference between HTML Elements and Tags.
HTML Elements refers to the portion of the web page like a paragraph, image, or link. However, they have a certain way of execution. For example, the link can be clicked and the text boxes can be used to input text.

HTML tags are placed in the content and format the pages. They are always specified between (<) and (>) symbols. For example, <h1>text</h1>. In this, an opening tag must be introduced with a closing tag and indicated with a ‘/’ symbol. Further, tags are used for changing the appearance of text, displaying a graphic, or linking another page.


Q.8 I want to display HTML data in a tabular format, which HTML tags should I use?
For displaying data in a tabular manner, a table tag will be used. This will include tags like:

<table>: For specifying a table.
<caption>: For providing a caption to the table.
<tr>: For specifying a row in a table.
<td>: For specifying a cell in a table.
<th>: For specifying a header cell in a table.
<tbody>: Used for grouping the body’s content in a table.
<col>: Used for defining the column properties for each column of the table.




Q.9 What do you understand about Attributes in HTML?
In HTML, an additional attribute is provided for every tag for altering the behavior of the tag. They can be defined directly after the tag name within the angular brackets. However, they appear only in opening tags and not in closing tags. For example, defining an attribute for the <input> tags like a text field, checkbox, or radio button.


Q.10 Explain the use of an Anchor tag in HTML.
An anchor tag is used for linking two sections, web pages, or website templates in HTML. The basic format: Where ‘href’ is an attribute of the anchor tag used for identifying the sections in a document. And, the ‘link’ is defined in the target attribute, that is to be linked.
Q.11 What is the use of lists in HTML?
HTML lists are used for grouping a set of related items in lists. They are defined with a <li> tag. However, some of the HTML lists used are:
Ordered List (HTML tag: <ol>)
Menu List (HTML tag: <menu>)
Unordered List (HTML tag: <ul>)
Description List (HTML tag: <dl>)
Directory List (HTML tag: <dir>)

Q.12 What is HTML Layout? Explain its various sections.
An HTML web page is arranged in a defined layout or format. This contains the sections of an HTML webpage for specifying the different parts of a webpage. The primary sections in a layout are: The header for defining a document or a section header. The main content in which the complete web page content is included. Footer for defining a document or a section footer. Other sections include articles and the navigation bar.
Q.13 What are forms used for in HTML?
If you want to collect the user information when they are filled, and details are provided for saving into the database, forms are used.
Q.14 Why we should comments in HTML?
Comments are used in an HTML document for making important notes and help developers to mention any modification to be incorporated afterward. They are hidden in the browser when the code is executed. However, a comment is always written in between the ‘—‘ symbol at the beginning and end of the angular brackets. The basic syntax:
Q.15 Which is the latest version of HTML? Explain briefly.
HTML5 is the latest HTML version released in 2014 by the WWW consortium. This comes with new qualities like: Firstly, the DOCTYPE declaration for declaring the HTML document type for instructing the web browser about the markup language. Secondly, the Main tag for defining the primary section in the document. This is related to the central content of a document with a tag. Then, Section tag for defining the specific sections. Lastly, the Article tag. This represents an independent or self-contained part of the content of a document with the tag
.
Q.16 What do you understand about semantic HTML?
Semantic HTML can be considered as one style of coding in which the tags convey the meaning of the text. HTML uses semantics for reinforcing the semantics or purpose of the content. For Example: and tags are used to make statements bold and italic in HTML. They are replaced with and tags in semantic HTML.
Q.17 Define an Image Map?
An Image map enables you to link different web pages with a single image. It is defined with the tag.
Q.18 What is the use of an embed tag in HTML?
An Embed Tag is used for linking a Video or Audio in an HTML Document. A source of audio or video file to be shown on the webpage is specified inside an Embed tag. The basic syntax:
<EMBED> Source </EMBED>.

Q.19 Define Marquee tag in HTML?
Marquee tag provides a scrolling text. Using this tag, an image or text can be scrolled up, down, left, or right. The text is defined inside the <marquee>__</marquee>.
Q.20 Explain void elements in HTML.
HTML elements with no closing tags or do not need to be closed are Void elements. For example,
, ,
, etc.
Q.21 Explain the advantages of collapsing white space.
In HTML, a blank sequence of whitespace characters is managed as a single space character. This is because the browser collapses multiple spaces into a single space character. This further helps a developer to cut the lines of text without any need to worry about multiple spaces thus maintaining the readability and understandability of HTML codes.
Q.22 Define HTML Entities.
In HTML there are characters that are reserved like ‘<’, ‘>’, ‘/’, etc. However, for using these characters in our webpage it is required to use the character entities called HTML Entities.
Q.23 Define a ‘class’ attribute in HTML.
The class attribute is used for specifying the class name for an HTML element. However, multiple elements in HTML can have the same class value. Further, it also helps in linking the styles written in the stylesheet with the HTML elements.
Q.24 Explain the major difference between an id and the class attribute of HTML elements.
In HTML, multiple elements can have the same class value. On the other hand, a value of the id attribute of one element cannot be linked with another HTML element.
Q.25 What do you understand by multipart form data?
Multipart form data can be considered as one of the values of the enctype attribute. This is used for sending the file data to the server-side for processing. However, the other valid values of the enctype attribute are text/plain and application/x-www-form-urlencoded.
Q.26 What is the process of optimizing website assets loading?
For optimizing website load time, it is required for optimizing its asset loading. For this, you can use: CDN hosting A CDN or content delivery network can be considered as a geographically distributed server that reduces latency. File compression This is a method used for reducing the size of an asset for reducing the data transfer. File concatenation This lowers the number of HTTP calls. Minify scripts This lowers down the overall file size of js and CSS files. Lazy Loading Rather than loading all the assets at once, the non-critical assets can be loaded on a required basis.
Q.27 Describe the various formatting tags in HTML?

HTML formatting tags include:

<b> - makes text bold
<i> - makes text italic
<del> - displays as strike out text
<em> - makes text italic but with added semantics importance
<big> - increases the font size of the text by one unit
<small> - decreases the font size of the text by one unit
<sub> - makes the text a subscript
<sup> - makes the text a superscript
<strong> - marks the text as important
<mark> - highlights the text
<ins> - displays as added text

Q.28 Name the various Doctypes in HTML.
The Doctypes which are available: Firstly, Strict Doctype Secondly, Transitional Doctype Thirdly, Frameset Doctype
Q.29 I want to create a hyperlink in HTML, which tag is best suitable for this?
For creating a hyperlink, HTML provides an anchor tag that links one page to another page. These tags can occur in: Firstly, the Unvisited link. This is displayed, underlined, and blue. Secondly, the Visited link. This is displayed, underlined, and purple. Lastly, the Active link. This is displayed, underlined, and red.
Q.30 What is the process for inserting a copyright symbol on a browser page?
For inserting a copyright symbol use &copy; or &#169; in an HTML file.
Q.31 Explain the process for creating a nested webpage in HTML?

For displaying a nested webpage, we can use the HTML iframe tag. This represents a webpage inside a webpage. The HTML <iframe> tag defines an inline frame.


Q.32 Can hyperlinks be only applied to text?
No, hyperlinks can be used both on text and images. However, the HTML anchor tag defines a hyperlink that attaches one page to another page. This includes the "href" attribute which is used for identifying the sections in a document. And, the ‘link’ is defined in the target attribute, that is to be linked.
Q.33 What do you understand about style sheets?
A style sheet is used for creating a consistent, transportable, and well-designed style template. In this, you can add these templates on various different web pages. Moreover, this explains the look and formatting of a document written in a markup language.
Q.34 Is it possible to create multi-colored text on a web page?
Yes, we can create multicolor text on a web page using for the specific texts you want to color.
Q.35 Can I change the color of the bullet?
The color of the bullet is always the color of the first text of the list. That is to say, if you want to change the color of the bullet, then, firstly, change the color of the text.
Q.36 What are the features of a span tag?
The span tag is used for: Firstly, adding color to text Secondly, adding background on text Thirdly, highlighting any color text For example:

In this page we use span.

Q.37 Explain the role of an iframe tag in HTML?

An iframe is used for displaying a web page inside a web page. The basic syntax:
<iframe src="URL"></iframe> 


Q.38 Can you explain why URLs are encoded in HTML?
An URL is encoded for converting non-ASCII characters into a format that can be used across the Internet. This is because a URL is sent over the Internet using the ASCII character-set only. However, if a URL consists of characters outside the ASCII set, then, it is required to convert the URL. Further, the non-ASCII characters are replaced with a "%" followed by hexadecimal digits.
Q.39 Is tag an HTML tag? Share your views.
No, the declaration cannot be considered as an HTML tag. However, there are many types of HTML e.g. HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, etc. Therefore, is used for instructing the web browser about the HTML page.
Q.40 Why and tags an important part of HTML?
tag gives all the information about the document. This should always be surrounded by the tag. However, this tag consists of the metadata about the webpage, and the tags which are enclosed by head tag are , ,