alert('Oh shit !!!! Javascript is disabled!!!! ');


Blog Archive

HTML&CSS Interview Questions

HTML Interview Questions And Answers


Ques: 1 WHAT is the HTML?
 
  • HTML stands for Hyper Text Markup Language.It is a markup language which is use to develop web pages. Using them we can describe our document into the form of text based information.For achieving that goals it has many tags like title,head,paragraph, table etc.In HTML we write tags surrounded with angle brackets.We can you some scripting language like JavaScript to display HTML doc in more attractive way.
    Some main features of HTML are given below:
    1.It is markup language.
    2.It has provided pre-defined tags.
    3.We save HTML file by using one of two extensions .htm or .html.
    4.It uses markup tags to display on web pages..
Ques: 2 What do you know about HTML tags?
 
    HTML tags decided how HTML file is look like on web page.I have given you some basic information about HTML tags.
    1.In HTML,every keyword should be surrounded with open and closed with angled brackets.
    Example:<html>,<body>,<title>,<head> etc.
    2.HTML tags are not case sensitive means that suppose if we open <Html> tags than we can closed this tag with <html>
    . 3.When we open an HTML tag it should we have to closed tag.Like:
    <a>....</a>
    4.In the above point tag (<a>) is called the open tag.where as tag</a> is called the end tag
    . Example:
    <head>
    <body>
    .....
    .....
    </body>
    </head>
Ques: 3 What are basic HTML tags how we use them?
 
    I have shown you some basic HTML tags with their example:
    1.Heading<h1...h6>:Range of HTML headings is from h1 to h6.When we go h1 to h6 its headings become larger and bold.
    Example:
    <h1>Write HTML heading between those tags</h1>
    <h2>Write HTML heading between those tags</h2>
    ........ ........ <h6>Write HTML heading between those tags</h6>
    2.Paragraph<p>...</p>:We write paragraph in HTML by using <p>.....</p> tag.
    Example:
    <p>Write here a paragraph</p>
    3.Link:Using this we can link our HTML file with some other files. Example:
    <a href="http://www.R4R.co.in"></a>
    4.Image:It is used to describe the image in HTML.
    <img src="welcome.gif" width="200" height="75" />
Ques: 4 Can we write a comment into the HTML?
 
    Yes,HTML provide us facility to write comments on HTML file.Comments that we write on HTML file are ignored by the browser so it will not display on browser. Syntax:
    <!-- Here write your comment -->
    Example:
    <html>
    <body>
    <!--Which you here not will diplayed on browser-->
    <p>R4R Welcomes You!</p>
    </body>
    </html>
    output:
    R4R Welcomes You!
Ques: 5 How to use Line Break and Horizontal Line tags in HTML?
 
    In HTML we use <br /> to break the line without started any new paragraph.
    Syntax:
    <br />
    In HTML <br /> has no end tag.
    Example:
    <p>Hello<br />client<br />R4R Welcomes You!</p>
    output:
    Hello client R4R Welcomes You!
    For creating horizontal line we use <hr /> in HTML.
    Syntax:
    <hr />
    Example:
    <p>This is upper level</p> <hr />
    <p>This is middle level</p> <hr />
    <p>This is bottom level</p>
    Both <br /> and <hr /> called as empty tags. Because their is no end tag for them.
Ques: 6 What are the benefits of HTML?
 
    Scalability
    Data Source Independence
    Interoperability
    Strongly Typed Fields
    Performance