HTML ESSENTIALS

  1. HTML is an acronym for Hypertext Markup Language.
  2. It is important to understand HTML to be truly creative with web pages.
  3. HTML provides the critical linking mechanism that allows pages to link to one another.
  4. Hyperlinking is the ability to link pages together.
  5. You may view the HTML code for any web page by opening any web page, then by selecting View on the main menu, and then Source.
  6. Knowing HTML guarantees that you will have complete control over your web page.
  7. Angle brackets look like this: < > and are used to enclose special codes called tags.
  8. An HTML document consists of two tags: a Starttag <html> and an Endtag </html>
  9. The two major sections of all web pages are the Head and Body.
  10. The Head of a web page describes general properties of the page.
  11. The Body contains the content of the web page.
  12. An end tag is simply the start tag plus a forward slash that immediately follows the opening angle bracket.
  13. When you bookmark a page, or add it to your favorites list, the web browser uses the title of the page to identify it.
  14. An attribute is a customizable option for a tag and are used to describe the properties of a tag.
  15. Text can be aligned three different ways on a page (Left, Center, Right). The align attribute is used to accomplish this.
  16. Tag definitions:
  17. <b>Bold
  18. <img> Image
  19. <a>Anchor or hyperlink
  20. <ul>Unordered list of bulleted items
  21. <ol>Ordered list of numbered items
  22. HTML is not case-sensitive, however it is often best to enter tags and attributes in lowercase.
  23. Attributes are always specified as part of a start tag and always consist of the attributename followed by an equalsign, followed by the attributevalue.
  24. Example: <body bgcolor=”purple”>
  25. Quotation marks must be used when the attribute contains spaces.
  26. A required attribute must be supplied values anytime you use the tag.
  27. The anchortag is used to create hypertext links.
  28. The hrefattribute specifies what web page you are linking to.
  29. In this example, the anchor tag identifies the hyperlink and the href attribute identifies the target of the link.
  30. <a href=
  31. The purpose of a webserver is to receive requests for web pages and server them up for viewing.
  32. The client-serverrelationship means web pages are delivered from servers to browsers by request.
  33. Web pages you create are stored on a webserver.
  34. FTP stands for File Transfer Protocol.
  35. URL stands for Uniform Resource Locator which is another name for an Internet address.

1. What is HTML?

Answer1:
HTML, or HyperText Markup Language, is a Universal language which allows an individual using special code to create web pages to be viewed on the Internet.

Answer2:
HTML ( H yper T ext M arkup L anguage) is the language used to write Web pages. You are looking at a Web page right now.
You can view HTML pages in two ways:
* One view is their appearance on a Web browser, just like this page -- colors, different text sizes, graphics.
* The other view is called "HTML Code" -- this is the code that tells the browser what to do.

2. What is a tag?

In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to another page.

3. What is the simplest HTML page?

HTML Code:
<HTML>
<HEAD>
<TITLE>This is my page title! </TITLE>
</HEAD>
<BODY>
This is my message to the world!
</BODY>
</HTML>

4. What is the current version of HTML?

The current version is HTML 4.0, if compare with version HTML 3.2, tables, framesets, forms etc added with the facility of source code

5. How can I include comments in HTML?

the following rule to create HTML comments that both have valid syntax and work in browsers:

An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment. The following are examples of HTML comments:
* <!-- This is a comment. -->

* <!-- This is another comment,and it continues onto a second line. -->

* <!---->

6. What is a Hypertext link?

A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination. hyperlinks are four types , i.e clickable text, clickable image, intradocument link & mail to link

7. What is everyone using to write HTML?

Everyone has a different preference for which tool works best for them. Keep in mind that typically the less HTML the tool requires you to know, the worse the output of the HTML.

8. How do I specify page breaks in HTML for Print?

There is no way in standard HTML to specify where page breaks will occur when printing a page. HTML was designed to be a device-independent structural definition language, and page breaks depend on things like the fonts and paper size that the person viewing the page is using.

9. How can I display an image on my page?

Use an IMG element. The SRC attribute specifies the location of the image. The ALT attribute provides alternate text for those not loading images. For example:
<img src="logo.gif" alt="ACME Products" height=250 width=250 border=1 align=right/left>

10. How can I specify background images?

With HTML, you can suggest a background image with the BACKGROUND attribute of the BODY element. Here is an example:
<body background="imagefile.gif" bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#000080">
If you specify a background image, you should also specify text, link, and background colors.

11. My page looks good on one browser, but not on another.

There are slight differences between browsers, such as Netscape Navigator and Microsoft Internet Explorer, in areas such as page margins. The only real answer is to use standard HTML tags whenever possible, and view your pages in multiple browsers to see how they look.

12. How can I specify colors?

If you want others to view your web page with specific colors, With HTML, you can suggest colors with the TEXT, LINK, VLINK (visited link), ALINK (active link), and BGCOLOR (background color) attributes of the BODY element.
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#000080">

13. How do I create a link that sends me email?

Use a mailto link, for example
Send me email at: <A HREF="mailto:">mydomain</A>

14. How do I link an image to something?

Just use the image as the link content, like this:
<a href=.”url”..> <img src=.”url”.. alt=”content”</a>

15. How do I eliminate the blue border around linked images?

In your HTML, you can specify the BORDER attribute for the image:
<a href=...<img src=... alt=... border="0"</a>
16. How do I eliminate the space around/between my images?

If your images are inside a table, be sure to set the BORDER, CELLSPACING, and CELLPADDING attributes to 0. Extra space between images is often created by whitespace around the <IMG> tag in the markup. It is safe to use newlines inside a tag (between attributes), but not between two tags. For example, replace this:
(using table very easy to leave space between images)
<td ...<img src=... alt=...<img src=... alt=...</td>
with this:<td ...<img src=... alt=...<img src=... alt=...</td>
17. Why does the browser show my plain HTML source?

If Microsoft Internet Explorer displays your document normally, but other browsers display your plain HTML source from view and then source, of type "text/html".

For example, Internet Explorer users may still click "View" and "Source" to view the source code of the page,

18. HTML for Lists

1. unordered list (Bulleted lists): <ul> begins a bulleted, indented list. Each item in the list is then prefaced with the <li> tag. It is not necessary to insert a break at the end of each line -- the <li> tag automatically creates a new line.
* with <li type=disc>* with <li type=square>* with <li type=circle>

2. ordered list(Numbered Lists): <ol> begins a numbered, indented list. Each item in the list is then prefaced with the <li> tag. You need to close the list with the </ol> tag. Note: You can expand the <ol> to specify the TYPE of numbering:
<ol> 1 (decimal numbers: 1, 2, 3, 4, 5, ...)
<ol type="a"> a (lowercase alphabetic: a, b, c, d, e, ...)
<ol type="A"> A (uppercase alphabetic: A, B, C, D, E, ...)
<ol type="i"> i (lowercase Roman numerals: i, ii, iii, iv, v, ...)
<ol type="I"> I (uppercase Roman numerals: I, II, III, IV, V, ...)

3.Definition list :<dl> these list are lke unordered but each item is displayed by <dt> data term <dd>data definition wise

19. What is a DOCTYPE? Which one do I use?

According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses.

20. How can I check for errors?

HTML validators check HTML documents against a formal definition of HTML syntax and then output a list of errors. Validation is important to give the best chance of correctness on unknown browsers (both existing browsers that you haven't seen and future browsers that haven't been written yet).

21. How do I align a table to the right (or left)?

You can use <TABLE ALIGN="right"> to float a table to the right. (Use ALIGN="left" to float it to the left.) Any content that follows the closing </TABLE> tag will flow around the table. Use <BR CLEAR="right"> or <BR CLEAR="all"> to mark the end of the text that is to flow around the table, as shown in this example:
The table in this example will float to the right.
<table align="right">...</table>
This text will wrap to fill the available space to the left of (and if the text is long enough, below) the table.
<br clear="right">
This text will appear below the table, even if there is additional room to its left.

22. Can I use percentage values for <TD WIDTH=...>?

The HTML 3.2 and HTML 4.0 specifications allow only integer values (representing a number of pixels) for the WIDTH attribute of the TD element. However, the HTML 4.0 DTD allows percentage (and other non-integer) values, so an HTML validator will not complain about <TD WIDTH="xx%">. & <TABLE WIDTH="100%">
23. How do I create frames? What is a frameset?

Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple documents can be displayed in a single window, each within its own frame. Graphical browsers allow these frames to be scrolled independently of each other, and links can update the document displayed in one frame without affecting the others.
The frameset document should also include alternative non-framed content in a NOFRAMES element.
The HTML 4 frames model has significant design flaws that cause usability problems for web users.

24. How do I specify a specific combination of frames instead of the default document?

This is unfortunately not possible. The author can provide multiple frameset documents, one for each combination of frame content. the author can link to these separate frameset documents using TARGET="_top". Thus, the URL of the current frameset document will always specify the combination of frames being displayed, which allows links, bookmarks, etc. to function normally.

25. How do I open a link into a new window?

This feature is a byproduct of frames (In many opinions, the only good things frames did for web design). On any HTML page, you can just add target="_blank" to your link syntax. e.g. yoursite.com

26. How do I create a link that opens a new window?

<a target="_blank" href=...> opens a new, unnamed window.
<a target="example" href=...> opens a new window named "example", provided that a window or frame by that name does not already exist.
27. How do I get out of a frameset?

this is easy. user only have to add the TARGET attribute to the link that takes readers to the intended 'outside' document. Give it the value of _top, with the TARGET attribute set to _top so the document displays in the full window if the link is followed

28. How do I use forms?

The basic syntax for a form is: <FORM ACTION="[URL]">...</FORM>
When the form is submitted, the form data is sent to the URL specified in the ACTION attribute. This URL should refer to a server-side (e.g., CGI) program that will process the form data. The form itself should contain
* at least one submit button (i.e., an <INPUT TYPE="submit" ...> element),
* form data elements (e.g., <INPUT>, <TEXTAREA>, and <SELECT>) as needed, and
* additional markup (e.g., identifying data elements, presenting instructions) as needed.

29. How do I create a button which acts like a link?

This is best done with a small form:
<FORM ACTION="[URL]" METHOD=GET>
<INPUT TYPE=submit VALUE="Text on button">
</FORM>
30. What is the difference between the HTML form methods GET and POST?

The method parameter specifies which method the client is using to send information to the WEB server. The method determines which parameter you will find the CGI request data in:
* POST - post_args
* GET - http_search_args

31. How to transferring user to new web page automatically? (or)

How to reloading of the user to refresh web page automatically from the browser?

You will need to use the below meta tag.
<META HTTP-EQUIV="Refresh" CONTENT="2"; URL="
Placing the above tag in your <HEAD</HEAD> will load yousite.com in 2 seconds.
Changing the 2 value on CONTENT="2" to another value will increase or decrease the delay until loading the new page.

CASCADING STYLE SHEETS

1. What is cascade?

Cascade is a method of defining the weight (importance) of individual styling rules thus allowing conflicting rules to be sorted out should such rules apply to the same selector.
Declarations with increased weight take precedence over declaration with normal weight:
P {color: white ! important} /* increased weight */
P (color: black} /* normal weight */

2. What is CSS?

1. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. Every element type as well as every occurance of a specific element within that type can be declared an unique style, e.g. margins, positioning, color or size.

2. Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.

3.A Cascading Style Sheet (CSS) is a list of statements (also known as rules) that can assign various rendering properties to HTML elements. Style rules can be specified for a single element occurrence, multiple elements, an entire document, or even multiple documents at once.

3. What are Style Sheets?

Style Sheets are templates, very similar to templates in desktop publishing applications, containing a collection of rules declared to various selectors (elements)

4. What is a Style Sheet?

Style sheets are the way that standards-compliant Web designers define the layout, look-and-feel, and design of their pages. They are called Cascading Style Sheets or CSS. With style sheets, a designer can define many aspects of a Web page:
* fonts* colors
* layout* positioning
* imagery* accessibility
5. Which browsers support CSS?

* Internet Explorer 5.0 for Macintosh and above* Internet Exporer 5.5 for Windows and above
* Netscape Navigator 6.0 and above* Opera 4.0 and above

javascript

Script:Any program that is run by a web server in response to a user’s request.

1. What is JavaScript?

JavaScript is a platform-independent, event-driven, interpreted client-side scripting and programming language developed by Netscape Communications Corp. and Sun Microsystems.

JavaScript: An interpreted, object-based scripting language developed by Netscape communications that adds interactivity to Web pages.

(Object-oriented: A style of programming that links data to the processes that manipulate it. )

2.What is JavaScript? Mention its various types.
JavaScript is a platform-independent, event-driven, interpreted client-side scripting.

The various types are Number, String, Boolean, Function, Object, Null, Undefined

3. What are JavaScript types?

Number, String, Boolean, Function, Object, Null, Undefined

4. What does is NaN function do?

Return true if the argument is not a number

5. Are Java and JavaScript the Same?

No.java and javascript are two different languages.
Java is a powerful object - oriented programming language like C++,C whereas

Javascript is a client-side scripting language with some limitations.

6. What boolean operators does JavaScript support?

&, || and !

7. What does "1"+2+4 evaluate to?

Since 1 is a string, everything is a string, so the result is 124

8. How about 2+5+"8"?

Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result

9. How to set a HTML document's background color?

document.bgcolor property can be set to any appropriate color

10. What is the data type of variables of in JavaScript?

All variables are of object type in JavaScript.

11. How to comment javascript code?

Use // for line comments and /* */ for block comments

12. What are Variables.?

Variables: Named pieces of data of different types. The value of variables can be changed, and the value can be referred to by the name of the variable.

13. What is variable typing in javascript?

It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows
example
i = 10;
i = "string";
This is called variable typing

14 What does is Nan function do?
A) Return true if the argument is not a number.
B) Return true if the argument is a number.
C) Return true if the argument is divided by zero.
D) Return true if the argument is a perfect square

15 How to declare the methods in Javascript?
Methods are the actions that can be performed on objects.
Example:
script type=”text/javascript”>

var str=”Hello world!”
document.write (str.toUpperCase ())