Logo F2FInterview

HTML Interview Questions

Q   |   QA
‹‹ previous123456

HTML is a language for describing web pages.

HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages

HTML markup tags are usually called HTML tags

HTML tags are keywords surrounded by angle brackets like <html>
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
Start and end tags are also called opening tags and closing tags
 

HTML documents describe web pages
HTML documents contain HTML tags and plain text
HTML documents are also called web pages

The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:

<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

Example Explained

The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph

This isn’t really possible in a reliable way, until style sheets are more widely supported. At this moment, there are several browser-specific kludges and tricks available, but these are not guaranteed to work.
1) Use a number of ( ) characters. Netscape and related browsers do not collapse these, like normal spaces, so this appears as an indent in these browsers. Other browsers can display it as one space.
2) Put a <DD> at the beginning of the line. This is syntactically invalid, but Netscape works around this by indenting the line at this ball. Of course, other browsers will handle this differently, and there is no guarantee that Netscape will keep doing this.
3) Use a blank, transparent GIF, using WIDTH and HEIGHT to indicate the desired white space. This is a very ugly solution, as it only works if you have image loading on, otherwise you get the “Image” icon at the beginning of the line. Not all browsers support resizing using these attributes, and you can only “indent” a certain number of pixels, not characters. So the amount of “indentation” varies with the font size used to display your document.

Again, there is no reliable way to do this. Netscape will indent text inside a <BLOCKQUOTE>, but other browsers don’t have to do this. These could show the text in italics, or perhaps with quotation marks around the text. This could come out very strange.
An alternative is to use <DL> without <DT> and <DD>, which is invalid HTML, but several browsers work around this error by indenting the text inside it. This is not guaranteed to work.
If you are willing to use tables for layout purposes, there is another option. Create a one-cell table, as follows:
<CENTER>
<TABLE width=”805px”>
<TR><TD><DIV align=left>
<!– The text goes here –>
</DIV>
</TD></TR>
</TABLE>
</CENTER>

A drawback to this solution is that very long blocks inside a table may take a while to download and may not appear until the entire table has been downloaded. Another drawback is that it may force users to resize their viewing window after they have become accustomed to their preferred settings.

‹‹ previous123456

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: