HyperText Markup Language commonly referred to as HTML is the standard markup language used to create web pages. It is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>). 

HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags).
HTML is a markup language for describing web documents (web pages).
  • HTML stands for Hyper Text Markup Language
  • A markup language is a set of markup tags
  • HTML documents are described by HTML tags
  • Each HTML tag describes different document content
HTML Interview QA

Top 50 HTML Interview Questions and Answers for freshers and experienced are below are below :


1. HTML Stand for?
HyperText Markup Language

2. What is use of HTML?
HTML is the standard markup language used to create web pages.

3. What is DOCTYPE?
tells the browser which type of HTML is used on a webpage.

4. What is a tag in HTML?
a tag tells the browser what to do.

5. HTML tags are keywords (tag names) surrounded by angle brackets:
<tagname>content</tagname>
HTML tags normally come in pairs like <p> and </p>
The first tag in a pair is the start tag, the second tag is the end tag
The end tag is written like the start tag, but with a slash before the tag name


6. Tags to open and close an HTML document
All HTML documents should begin with the following set of tags:
<HTML>
<HEAD>
<TITLE>
Write your title here.
</TITLE>
</HEAD>
<BODY>
Begin your main body of text here.
All HTML documents should end with the following set of tags:
</BODY>
</HTML>

7. What is hyperlink or How to create link in HTML?
A hyperlink is an element, a text, or an image that you can click on, and jump to another document.

Syntax: <a href="url">link text</a>
Example: <a href="http://www.example.com/html/">Visit our HTML tutorial</a>
The href attribute specifies the destination address(http://www.example.com/html)
The link text is the visible part (Visit our HTML tutorial).
Clicking on the link text, will send you to the specified address.

8. What is Attributes in HTML ?
Attributes provide additional information about an element
Attributes are always specified in the start tag
Attributes come in name/value pairs like: name="value"

Example: <html lang="en-US">

9. Comments in HTML?
Comment tags <!-- and --> are used to insert comments in HTML.
Example: <!-- Write your comments here -->

10. CSS stand for?
Cascading Style Sheets


11. How many way for Styling HTML with CSS?
Styling can be added to HTML elements in 3 ways:
Inline - using a style attribute in HTML elements
Internal - using a <style> element in the HTML <head> section
External - using one or more external CSS files

The most common way to add styling, is to keep CSS syntax in separate CSS files.

12. Useful HTML Tags?
<P> : Use to create paragraphs. You must use this between each paragraph or else all of them will run together.
<BR> : Use to make a line break.
<HR> : Use to make a line across the page.

13. Image tag in html?
The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The src attribute defines the url (web address) of the image:
<img src="url" alt="some_text">

You can use the style attribute to specify the width and height of an image.
The values are specified in pixels (use px after the value):

Example: <img src="url" alt="HTML5 Tuts" style="width:120px; height:120px">

14. What is marquees?
An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag.


15. Tables in HTML?
The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.

The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells.

Example
<!DOCTYPE html>
<html>
<head><title>HTML Tables</title></head>
<body>
<table border="1">
<tr><td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
</html>

16. HTML Lists?
HTML can have Unordered Lists, Ordered Lists, or Description Lists

Unordered HTML List
  • first item
  • second item
  • third item
  • fourth item
Ordered HTML List
  1. first item
  2. second item
  3. third item
  4. fourth item
HTML Description List
      The first item
      Description of item
      The second item
      Description of item

17. HTML <div> Element?
HTML <div> element is a block level element that can be used as a container for other HTML elements.
the <div> element can be used to style blocks of content.

18. HTML <span> Element?
HTML <span> element is an inline element that can be used as a container for text.
Example: <h1>My <span style="color:red">Important</span>Heading</h1>

19. What is Canvas?
Canvas is a medium for oil painting. One of the earliest oils on canvas is a French Madonna from 1410. Canvas is typically stretched across a wooden frame.
On the HTML canvas, you can draw all kinds of graphics, from simple lines, to complex graphic objects.
The HTML <canvas> element (introduced in HTML5) is a container for canvas graphics.
An HTML canvas is a rectangular area on an HTML page.
Canvas has several methods for drawing paths, boxes, circles, text, and graphic images.

20. What is Responsive Web Design?
RWD stands for Responsive Web Design
RWD can deliver web pages in variable sizes
RWD is a must for tablets and mobile devices

Post a Comment

 
Top