Interview Questions

HTML Interview Questions and Answers

Interview Questions December 28, 2018
HTML Interview Questions and Answers

HTML Interview Questions and Answers

HTML Interview Questions and answers for beginners and experts. List of frequently asked HTMLInterview Questions with answers by Besant Technologies. We hope these HTML Interview Questions and answers are useful and will help you to get the best job in the networking industry. This HTMLInterview Questions and answers are prepared by HTML Professionals based on MNC Companies expectation. Stay tuned we will update New HTML Interview questions with Answers Frequently. If you want to learn Practical HTML Training then please go through this HTML Training in Chennai.

Best HTML Interview Questions and answers

Besant Technologies supports the students by providing HTML Interview Questions and answers for the job placements and job purposes. HTML is the leading important course in the present situation because more job openings and the high salary pay for this HTML and more related jobs. We provide the HTML online training also for all students around the world through the Gangboard medium. These are top HTML Interview Questions and answers, prepared by our institute experienced trainers.

HTML Interview Questions and answers for the job placements

Here is the list of most frequently asked HTML Interview Questions and answers in technical interviews. These questions and answers are suitable for both freshers and experienced professionals at any level. The questions are for intermediate to somewhat advanced HTML professionals, but even if you are just a beginner or fresher you should be able to understand the answers and explanations here we give.

Q1) What is HTML?

HTML stands for the HyperText Markup Languages. It is the most popular to markup language for creating to websites that can be viewed in the web browsers.

Q2) What is the difference between the HTML elements and tags?

HTML elements communicate to the browser how to render of text. When surrounded by angular brackets <> they form HTML tags, which can come in the pairs and a surround text.

Q3) What does the DOCTYPE mean?

The term DOCTYPE means Document Type of Definition and tells them browser which type of HTML is used on the webpage. Browsers use DOCTYPE to determine how to render pages. Failing to use of  DOCTYPE will load your page in the Quirks Mode.

Q4) What is the syntax difference between bulleted and numbered list?

Bulleted lists use of  the <ul> tag, which stands for “unordered,” whereas <ol> is used to the create the ordered lists.

Q5) What is the difference between the a <div> and a <frame>?

A <div> is a container element for the grouping and styling, whereas a <frame> creates divisions within a web page and should be used within the <frameset> tags. The use of <frame> and <frameset> are no longer popular and now being replaced with more flexible <iframe>, which has to become to popular for the embedding the elements from other websites (ie. Youtube videos) into a pages.

Q6) What is the difference between application model of HTML & HTML5?

There is not a big difference between the two. HTML5 is a continuum of HTML. There has been no major paradigm shifts. From a broader viewpoint, HTML was a simple language for the laying out text and images on a webpages, whereas HTML5 can be viewed as the development platform that does what HTML does that and more, including better support for the audio, video, and interactive graphics. It has to the number of new elements, supports offline data storage for the applications, and has more robust exchange protocols.

Q7) What are some of new HTML5 markup elements?

Among several: <article>, <aside>, <bdi>, <commands>, <details>, <figure>, <figcaption>, <summary>, <headers>, <footer>,<hgroup>, <mark>, <meter>, <navs>, <progress>, <ruby>, <rt>, <sections> and <time>.

Q8) What are the new image of elements in HTML5?

The new image elements in HTML5 are the Canvas and WebGL. is a new element that acts of a container for graphical elements like images and graphics. WebGL stands for the Web Graphics Language, a free cross-platform of API that is used for creating 3D graphics in the web browsers.

Q9) Describe the difference between the cookies, sessionStorage, and localStorage.

Cookies are small text files that websites of place in a browser for tracking or login purposes, and hold a modest amount of the data.Meanwhile, localStorage and sessionStorage are new objects, both of which are the storage specifications but vary in a scope and duration. Local storage is the more secure, and large of amounts of data can be stored on locally, without affecting website to performance.Furthermore, is it permanents. sessionStorage only lasts of long as the duration of the longest on open tab.

Q10) What is the difference in caching between the HTML5 and the old version of HTML?

A crucial new feature of the  HTML5 is the Application Cache which a creates an offline version of the web application. And a stores website files to such as HTML files, CSS, images, and JavaScript, locally. Obviously, that can speed up site performances.

Q11) What is the image map?

An image map is the list of coordinates relating to the specific image, created in order to the hyperlink areas of the image to different destinations (as opposed to an normal image link, in which entire area of the image links to the single destination).

Q12) What is the advantage of the collapsing to white space?

White spaces is blank sequences of the space characters, which is actually treated on a single space character in the HTML. The browser collapses multiple space into the single space, so we can indent to lines of text without worrying about the multiple spaces. This enables us to organize the code into the much more readable format.

Q13) Do all HTML elements do need both opening and closing tags?

Not really, The elements like <img src=””/> or <input type=””/> don’t need the closing tag.

Q14) What is a marquee?

A marquee is used to enable scrolling text in the web page. To do this, just place whatever text for you want to appear to scroll within the <marquee> and </marquee> tags.

Q15) How do you create a link to the sections within the same page?

Links can be created using the <a> tag, with the referencing through the use of the # symbol. For example, we can have:

<a href=”#top”>BACK TO TOP</a>

which would result in the words “BACK TO TOP” appearing on the web pages  and links to the bookmark named top. We can then

create a separate tag like:

<a name=top></a>

somewhere on the same webpage so that the user will be linked to the place when clicking on “BACK TO TOP”.

Q16) How would you use of persistent storage on the browsers? What options would do you use?

For HTML browsers, a good choice would be local storage and persistent storage. For non-HTML ones, cookies are the best bet.

Q17) What are the two common ways in which you can reduce the load time of a web application?

There are quite a lot of ways you can reduce load time:

  • Enable browser caching,
  • Optimize images,
  • Minify resources,
  • Minimize HTTP Requests,
  • Reduce redirect.
Q18) What is the difference between Web development and Web design.

Web development includes an lot of processes, and Web Design is the part of it. Web design is used to represent page layouts and graphical user to interface. Web development is the wider term to a mean of planning, coding, testing, debugging etc.

Q19) What is the CORS? How does it work?

Cross-origin resource of sharing (CORS) is a mechanism that allows many of restricted resources (e.g. fonts, js etc.) on web pages to be requested from another domain outside the domain from which the resource an originated. It’s the mechanism supported in the HTML5 that manages XMLHttpRequest access to the domain different.

Q20) Do all HTML tags to come in a pair?

No, there are single HTML tags that do not need a closing tag.

Q21) What does a hyperlink apply to text only?

No, hyperlinks can be used in the text as a well as the images. That means you can convert an image into an link that will allow to users to link to another page when clicked. Surround the image within the <a href=” “>…</a> tag in combinations.

Q22) What are the limits of text field size?

The default size for the text field is around 13 characters. However, if you include to the size attribute, you can set of the size value to be as low as 1. The maximum size value will be to determined by the browser width. If the size attribute is the  set to 0, the size will be set to the default of size is 13 characters.

Q23) Do <th> tags always to need to come at the start of an row or column?

Any <tr> tag can be changed to the <th> tag. This causes to the text contained within the <th> tag to be displayed as the bold in the browsers. Although <th> tags are mainly used for the  headings, they do not need to be used to exclusively for the headings.

Q24) What is the relationship between to the border and rule attributes?

Default cell borders, with an thickness of 1 pixel, are automatically to added between cells if the border can attribute is set to the nonzero values. Likewise, If the border attributes  is not included, a default 1-pixel border to appears if the rules attribute is the  added to the <table> tag.

Q25) Are <br> tags the only way to the separate sections of text?

No. The <br> tag is only one of the way to separate lines of the text. Other tags, like the <p> tag and <blockquote> tag, also to separate sections of the text.

Q26) How do you make a picture into the background image of a web page?

To do this, place a tag code after the </head> tag as follows:

<body background = “image.gif”>

Q27) Which browsers support to HTML5?

The latest versions of the Google Chrome, Apple Safari, Mozilla Firefox, and Opera all support to most of the HTML5 features.

Q28) Name two new tags included to the HTML 5

<Video> and <Audio> are new tags which are included to HTML5 version. They are mainly used to a replacement for Flash, Silverlight, and similar technologies to the play multimedia items.

Q29) Do you know which are the two semantic tags are included in HTML5 version?

The <article> and <section> tags are the two new tags that are included in HTML5. Articles can be composed to multiple sections that can have multiple articles. An article tag of represents a full block of the content which is a section of the bigger whole.

Q30) What is <figure> in the HTML5?

This tag represents a piece of self-contained flow to content. It is mostly used as the single unit as a reference to the main flow of the document.

Q31) What is the use of Canvas of an element?

The canvas element helps to the build charts, graphs, bypass Photoshop to create 2D images and place them directly into the HTML5 code.

Q32) Is it possible to the list elements straight in an HTML file?

– Yes, it is possible with the use of the indents.

Q33) How can I hide of my source?

No. you can’t hide your source as it is the required by the browser to display in your document.

Q34) How will you align a table to the right or left?
  • To align a table to the right, you can use <TABLE ALIGN=”right”>
  • To align a table to the left, you can use <TABLE ALIGN=”left”>
Q35) Why doesn't <TABLE WIDTH='100%'> use to the full browser width?
  • Because the graphical browser is designed to the leave a margin between in the display area and the actual content.
  • The navigator also to leaves of some space for the scroll bar in the right side of the display areas. Though, if the page is not long enough, the scroll bar cannot appear.
Q36) Explain the Cell Padding and Cell Spacing.
  • Cell Padding: It refers to the gap or the space between the cell contents and cell borders or cell wall.
  • Cell Spacing: It refers to the gap between to the two cells of same of
Q37) How many types of CSS can be included in the HTML?

There are three ways to include to the CSS with HTML:

  • Inline CSS: It is used when to the only small context is to be styled. – To use inline styles add in the style attribute in the relevant tag.
  • External Style Sheet: Is used when to the style is applied to the many pages.
  • Each page must link to the style of the sheet using the <link> tag. The <link> tag goes to inside the head section.
Q38) Does HTML support to the Javascript?

Yes, HTML supports the  JavaScripts. We can use of the JavaScript anywhere in the HTML Coding. Mainly there are the four sections where we can add to JavaScript in HTML.

Q39) What is the purpose of the canvas in HTML?

Canvas is on the element that is used for the graphics for the web pages. It uses JavaScript to bring the graphics functionality to live. It allows to an easy way to the draw the graphics and uses to different types of tools to create the drawing on the web pages. Canvas is just a rectangular area that control to the pixel of every to an element that is used in the web pages. Canvas uses methods like paths, circles, etc.

Q40) What is the main function of the <pre> tag in HTML?

<pre> tag defines is the pre-formatted text that is used to the display the text with the fixed width and uses a predefined the fonts and it keeps both spaces and line breaks in separate and shows the text as it is.

Q41) How can be tabled be made to nested in HTML?

Tables can be made to nesting by making it come in another table. This consists of the many attributes and tags that can be used in the nesting the tables.

The tags that are used for the table is as follows:

<TR> : This is the tag that has to be written to after the <table> tag and before to any other tags. This makes the table row that store to the data elements.

<TD> : This tag can be used on anywhere and it consists of the data that has to become on the website.

<TH> : This tag consists of the table of heading.

Q42) How do I make a form so it can be submitted by the hitting ENTER?

The short answer is that the form that should just have one <INPUT TYPE=TEXT> and no TEXTAREA, though it can behave another form of elements like checkboxes and radio buttons.

Q43) Do I have to memorize a bunch of tags?

No. Most programs that help you write an HTML code already know that most tags, and create to them when you press a button. But you should understand what a tag is, and how it works. That way you can be correct errors in your page of more easily.

Q44) How can I display to an image on my page?

Use on IMG element. The SRC attribute specifies to the location of the images. The ALT attribute provides to alternate text for the those not loading images. For example:

<img src=”logo.gif”alt=”ACME Products”>

Q45) How do I make a form so it can be submitted by the hitting ENTER?

The short answer is that the form to should just to have the one <INPUT TYPE=TEXT> and no TEXTAREA, though it can have to  other form elements like the checkboxes and radio buttons.

Q46) How do I set the focus to first form on field?

You cannot do this with of  HTML. However, you can include an script after the form that sets of  the focus to the appropriate field of  like this:

<form id=”myform” name=”myform” action=…>

<input type=”text” id=”myinput” name=”myinput” …>

</form>

Q47) How do I link on the image to something?

Just use the image on the link content, like this:

<a href=…><img src=… alt=…></a>

Q48) How do I create a link that opens to the new window?

<a target=”_blank” href=…> opens an new, unnamed windows.

<a target=”example” href=…> opens a new window named “example”, provided to that a window or frame by that name does not already can be exist.

Note that the TARGET attribute is not part of the  HTML 4 Strict. In HTML 4 Strict, new windows can be created only with the JavaScript. links that open new windows can be annoying to your readers if there is not the good reason for them.

Q49) How do I let people download an file from my page?

Once the file is uploaded to server, you need only for use an anchor reference tag to link to it. An example would be:

<a href=”../files/foo.zip”>Download Foo Now! (100kb ZIP)</a>

Q50) Can I use any of HTML in the box?

Yes. Any HTML tag that in your browser supports will work in the box. So you can carry tags from the chapters to chapters and mix and matches.

Besant Technologies – Chennai & Bangalore Branch Locations

Besant Technologies - Velachery Branch

Plot No. 119, No.8, 11th Main road, Vijaya nagar,

Velachery, Chennai - 600 042

Tamil Nadu, India

Landmark - Reliance Digital Opposite Street

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Tambaram Branch

No.2A, 1st Floor, Duraisami Reddy Street,

West Tambaram, Chennai - 600 045

Tamil Nadu, India

Landmark - Near By Passport Seva

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - OMR Branch

No. 5/318, 2nd Floor, Sri Sowdeswari Nagar,

OMR, Okkiyam Thoraipakkam, Chennai - 600 097

Tamil Nadu, India

Landmark - Behind Okkiyampet Bus Stop,

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Porur Branch

No. 180/84, 1st Floor, Karnataka Bank Building,

Trunk Road, Porur, Chennai - 600 116

Tamil Nadu, India

Landmark - Opposite to Gopalakrishna Theatre

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Anna Nagar Branch

Plot No:1371, 28th street kambar colony,

I Block, Anna Nagar, Chennai - 600 040

Tamil Nadu, India

Landmark - Behind Reliance Fresh

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - T.Nagar Branch

Old No:146/2- New No: 48,

Habibullah Road,T.Nagar, Chennai - 600 017

Tamil Nadu, India

Landmark - Opposite to SGS Sabha

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Thiruvanmiyur Branch

22/67, 1st Floor, North mada street, Kamaraj Nagar

Thiruvanmiyur, Chennai 600041

Tamil Nadu, India

Landmark - Above Thiruvanmiyur ICICI Bank

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Siruseri Branch

No. 4/76, Ambedkar Street, OMR Road, Egatoor, Navallur,

Siruseri, Chennai 600130

Tamil Nadu, India

Landmark - Near Navallur Toll Gate, Next to Yamaha Showroom

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - Maraimalai Nagar Branch

No.37, Ground Floor, Thiruvalluvar Salai,

Maraimalai Nagar,Chennai 603209

Tamil Nadu, India

Landmark - Near to Maraimalai Nagar Arch

  +91-8099 770 770

  info@besanttechnologies.com

Besant Technologies - BTM Layout Branch

No 2, Ground floor, 29th Main Road,

Kuvempu Nagar,BTM Layout 2nd Coming from Silkboard,

AXA company signal, Stage, Bangalore - 560 076

Karnataka, India

Landmark - Next to OI Play School

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Marathahalli Branch

No. 43/2, 2nd Floor, VMR Arcade,

Varthur Main Road, Silver Springs Layout,

Munnekollal, Marathahalli, Bengaluru - 560037

Karnataka, India

Landmark - Near Kundalahalli Gate Signal

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Rajaji Nagar Branch

No. 309/43, JRS Ecstasy, First Floor,

59th Cross, 3rd Block, Bashyam Circle,

Rajaji Nagar, Bangalore - 560 010

Karnataka, India

Landmark - Near Bashyam Circle

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Jaya Nagar Branch

No. 2nd Floor,1575,11th Main Road,

4th T-Block, Pattabhirama Nagar,

Jaya Nagar, Bangalore - 560 041

Karnataka, India

Landmark - Opposite to Shanthi Nursing Home

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Kalyan Nagar Branch

No.513, 4th Cross Rd

2nd Block, HRBR Layout,

Kalyan Nagar, Bangalore - 560 043

Karnataka, India

Landmark - Opposite to kalayan nagar Axis Bank

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Electronic City Branch

No. 7, 3rd Floor, Ganga Enclave,

Neeladri Road, Karuna Nagar, Doddathoguru Village,

Electronics City Phase 1, Electronic City,

Bangalore - 560100, karnataka, India

Landmark - Adjacent to HDFC Bank and State Bank Of India

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Indira Nagar Branch

No.54, 1st Floor,

5th Main kodihalli,

Bengaluru, Karnataka 560008, India

Landmark - Behind Leela Palace Hotel,

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - HSR Layout Branch

Plot No. 2799 & 2800, 27th Main,

1st Sector, HSR Layout,

Bengaluru, Karnataka 560102, India

  +91-8767 260 270

  info@besanttechnologies.com

Besant Technologies - Hebbal Branch

No.29, 2nd Floor, SN Complex,

14th Main Road, E-Block Extention, Sahakara Nagar,

Bengaluru, Karnataka -560092, India

  +91-8767 260 270

  info@besanttechnologies.com

Scroll Up