HTML

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

HTML Interview Questions PDF

1. How many types of heading does an HTML contain?

• <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>

2. What is the difference between HTML elements and tags?

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

3. How to create a nested webpage in HTML?

• The HTML iframe tag is used to display a nested webpage. In other words, it
represents a webpage within a webpage. The HTML <iframe> tag defines an inline
frame.

4. What is a style sheet?

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

5. What is an image map?

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

6. What are some common lists that are used when designing a page?

There are many common lists which are used to design a page.

• Ordered list
• Unordered list
• Definition list

7. What is formatting in HTML?

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

8. Which HTML tag is used to display the data in the tabular form?
• 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.
• <table> - It defines a table
• <tr>- It defines a row in a table.
• <th>- It defines a header cell in a table. etc

9. Is it possible to change the color of the bullet?

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

10. Can you create a multi-colored text on a web page?

• To create a multicolor text on a web page you can use <font color ="color"> </font>
for the specific texts you want to color.

11. What is semantic HTML?

• Semantic HTML is a coding style. It is the use of HTML markup to reinforce the
semantics or meaning of the content.

12. What is a marquee?

• Marquee is used to put the scrolling text on a web page. It scrolls the image or text up,
down, left or right automatically.

13.List out of the layout of HTML?

• Header
• NAV
• Selection
• Aside
• Article
• Footer

14. How to create a hyperlink in HTML?

• The HTML provides an anchor tag to create a hyperlink that links one page to another
page.

15. How many tags can be used to separate a section of texts?

• <br> tag - Usually <br> tag is used to separate the line of text. It breaks the current
line and conveys the flow to the next line
• <p> tag - The <p> tag contains the text in the form of a new paragraph.
• <blockquote> tag - It is used to define a large quoted section. If you have a large
quotation, then put the entire text within <blockquote>.............</blockquote> tag.
16. What is the use of a span tag?

• For adding color on text


• For adding background on text
• Highlight any color text

17. What is HTML?

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

18. Why is a URL encoded in HTML?

• An URL is encoded to convert non-ASCII characters into a format that can be used
over the Internet because a URL is sent over the Internet by using the ASCII
character-set only.
• If a URL contains characters outside the ASCII set, the URL has to be converted. The
non-ASCII characters are replaced with a "%" followed by hexadecimal digits.

19. What is the canvas element in HTML5?

• The <canvas> element is a container that is used to draw graphics on the web page
using scripting language like JavaScript. It allows for dynamic and scriptable
rendering of 2D shapes and bitmap images.
• There are several methods in canvas to draw paths, boxes, circles, text and add
images.

20. What are the entities in HTML?

• The HTML character entities are used as a replacement for reserved characters in
HTML. You can also replace characters that are not present on your keyboard by
entities. These characters are replaced because some characters are reserved in
HTML.

21. What are the different new form element types in HTML 5?

• Color
• Time
• Url
• Range
• Telephone
• Number
• Search
• Date
• Datetime-local
• Email

22. Is audio tag supported in HTML 5?


• mp3
• WAV
• Ogg

23. What is the difference between progress and meter tag?

• The progress tag is used to represent the progress of the task only while the meter tag
is used to measure data within a given range.

24. Which type of video formats are supported by HTML5?

• mp4
• WebM
• Ogg

25. What is SVG?

• HTML SVG is used to describe the two-dimensional vector and vector/raster


graphics. SVG images and their behaviors are defined in XML text files.

You might also like