Tolal:40 Click:
1
2
HTML Interview Questions And Answers
Page 1
Ques: 1 WHAT is the HTML?
Ans:
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.
Ans:
HTML is hyper text markup language and used for static pages
Ans:
Hyper text markup language
Ques: 2 What do you know about HTML tags?
Ans:
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?
Ans:
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?
Ans:
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!
Ans:
<!-- --!>
Ques: 5 How to use Line Break and Horizontal Line tags in HTML?
Ans:
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 How you achieve text formatting in HTML?
Ans:
Using Text formatting we can change the over all view of the sentence.like that:
Example:
<b>This is bold text
<i>This is a italic text
I have given you some basic formatted tags.
<b> Used to create bold text
<big> used to create big text
<em> used to emphasized text
<i> Used to made italic text
<small> Used to create small text
<strong>used to made strong text
<sub> Used to subscripted text
<sup> Used to superscripted text
<ins> Used to inserted text
<del> Used to deleted text
<s> Deprecated. Use <del> instead
<strike>Deprecated. Use <del> instead
<u> Deprecated. Use styles instead
Ques: 7 What are the output tags?
Ans:
HTML provide some output tags that are given below:
<code> Used for computer code text
<kbd> Used for keyboard text
<samp> Used for sample computer code
<tt> Used for teletype text
<var> Describe a variable
<pre> Describe preformatted text
<listing> Deprecated. Use <pre> instead
<plaintext> Deprecated. Use <pre> instead
<xmp> Deprecated. Use <pre> instead
Ques: 8 How you define elements in HTML?
Ans:
Basically HTML element are those who define the structure of HTML document.It is used to arrange the content of HTML is an appropriate manner. Element may be of headings, links, paragraphs and structures etc.
When you want to create any HTML element than keep these points in mind.
1.Element should open with the start tag.
2.After that can include attributes with their values.Like: name="Abhi"
3.Than you write content.Like:This is our first HTML page.
4.and close with end tag.(but is optional when you want to create an empty element than their is no need to close your open tag)In HTML your content may be empty.
Example:
<p name="Abhi">My first HTML page</p>
|Open|Attribute name| Content |End|
|tag |with value | |tag|
--------------HTML element----------------
Ques: 9 What is the nested element in HTML?
Ans:
In HTML we create nested element mostly.
Example:
<html>
<body>
<title>This is my first HTML page.</title>
<p>HTML is used to create static pages.</p>
</body>
</html>
In the above example we have given you four HTML element.
First HTML element start with <html> and end with</html>.
Second HTML element start with <body> and end with</body>.
Third HTML element start with <title> and end with </title>
Fourth HTML element start with <p> and end with </p>.
Ques: 10 What is Empty HTML element?
Ans:
When HTML element does not have any content.Than those element are called as Empty element.Empty element does not have any end tag.
Example:
<br />(It is an empty element which is used to break line.)
Because it is an empty element than their is no need to close them.
To use empty element is only on HTML.Because in XHTML,XML and new versions of HTML does have provided this types of element.
Ques: 11 HTML is case sensitive or not?
Ans:
No, HTML is not a case sensitive language.In this we can use an uppercase HTML tags or lowercase HTML tag both.Means in the case of HTML both tags <title>
and <TITLE> are same.But we have try to use lowercase tags.Because new versions of HTML support only lowercase tags.Like: HTML 4
Ques: 12 How you define Attributes in HTML?
Ans:
Using Attributes we can give us more information about HTML elements.Many times in HTML we use Attributes with their associated value. For assigning the value to attributes we use'='operator.
In an one HTML element can have many attributes.We use Attributes with in start tag of HTML.
Below I have given you some attributes with their values.
style="color:red;"
border="1"
href="http://www.r4r.co.in"
title="This is our first HTML page."
I have given a example.How to use above three attributes together.
Example:
<p border="1" href="http://www.r4r.co.in" style="color:red;" title = "This is our first HTML page."></p>
Ques: 13 Attibutes names and their values are case-sensitive or not?
Ans:
Yes,Attributes and their values are case-sensitive. Both should be write on lowercase letters.In new versions of HTML W3C(World Wide Web Consortium) strongly said to use lowercase letters.Like: HTML 4,XHTML etc are use lowercase attributes with values should be write on lowercase letters.
Ques: 14 how you define HTML Attribute Reference?
Ans:
I have given you some Attribute with their description.These are.
style This attribute use to style inline
rules to an element.
Synatx:<a style="value>.......</a>
bgcolor This is use to set background color.
Syntax:<a bgcolor="value">....</a>
we use color values in Hexadecimal code.
href This is used for the linking.
Syntax:<a href="value?phpMyAdmin=70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2">.......</a>
size This is used to set the font size.
Syntax:<a size="value">.......</a>
title Those I wrote on this display on tooltip.
Syntax:<a title="value">.......</a>
Ques: 15 How you define HTML Style Attribute in HTML?
Ans:
We use Style Attribute in HTML how the text look like in HTML.Using Style we can implement the CSS in HTML.
I have given you some examples which show use of Style in HTML.
1.style="background-color:red"
2.style="font-size:15px"
3.style="font-family:verdana"
4.style="text-align:left"
Example:
<html>
<body style="background-color:yellow;">
<h1>Style Attribue</h1>
<p style="font-family:verdana;color:green">
This is my first HTML page where I use style attribute</p>
</body>
</html>
Ques: 16 What are the Deprecated Tags and Attributes?
Ans:
Basically Depreciated Tags and Attributes are those that are only used in HTML 4.Means they are old Tags and Attributes that are not supported in the new versions of HTML,Like:XHTML.Because those are not used in future than we should have to avoid the use of them.
I have given you list of these Depreciated Tags and Attributes are given below:
List of Deprecated Attributes are:
color This is used to set the text color.
align This is used for Horizontal alignment of
table and frames with the value uf
center,left and write.
bgcolor This is used to set background color.
List of Deprecated Tags are:
<u> This is used to underlined the text.
<font> This is used to set HTML font.
<strikeout>This is used to strikeout the text.
<center>This is used to centered the content.
Ques: 17 How you define HTML link?
Ans:
Using the HTML link we can addressed the page, document or file on the web browser.I have given you example how to link the HTML page.
Example:
<html>
<body>
<p>
R4R Welcomes You!
You are on the right place.Definitly your queries will gone when you proper visit that
site.
</body>
</html>
save this page with welcome.htm
<html>
<body>
<p>
<a href="welcome.htm?phpMyAdmin=70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2">
message from R4R</a>This link is linked with welcome page of R4R.
</p>
</body>
</html>
Ques: 18 What are the Hyperlink,Anchors and Link in the HTML?
Ans:
Using Hyperlink we can address the page or file on the web browser.These are may be of image, sound or movie file etc.
Using Anchors we can define the hyperlink destinatiion inside a document.
We use <a> tag to define the hyperlinks and anchors.
Ques: 19 How you define href,target and name Attributes?
Ans:
href Attribute is used to address the page and document on the web page.
Syntax:
<a href="http://www.r4r.co.in/">see R4R</a>
target Attributes are used to told about that where the document will open those linked.
<a href="http://www.r4r.co.in/" target="_blank">
see R4R</a>
name Attribute is used to set the anchor name in the HTMl document.
We named Anchor like that,
<a name="label">Write content here</a>
We can linked the named anchor like that,
<a href="#label">Write content here</a>
Ques: 20 How to link the Images with in HTML?
Ans:
I have given you syntax how to set images on HTML document.
Syntax:
<html>
<body>
<p>
An image:<img src="r4rlogo.gif"width="140" height="40">
</p>
<p>
Using this link you can see the logo of r4r.</p>
</body>
</html>
Goto Page:
1
2
HTML Objective
HTML Objective Questions And Answers
HTML Interview Questions And Answers
HTML Interview Questions And Answers
R4R,HTML Objective, HTML Subjective, HTML Interview Questions And Answers,HTML,HTML Interview,HTML Questions ,HTML Answers