6. What is Normalization?
A method which minimizes data redundancy and reduces design flaws. It consists of applying various “normal” forms to the database design. The normal forms break down large tables into smaller subsets.
7. Primary Key vs. Foreign Key
Foreign key is a reference in the child (many) table to the primary key of the parent (one) table.
8. What is SQL?
Structured Query Language (SQL) is the standard language for maintaining data in a relational database systems.
Hyper Text Markup
Lanuage(HTML):-Hypertext Markup Language (HTML) is the text markup language currently used on the World Wide Web. Markup is separate from the actual content of the document. HTML is used to tell Web browsers how to display Web pages.
1.1 Basic HTML Concepts
HTML is a tool for distributing information on the Web or on an Intranet.
This information can be any message you wish to communicate to another individual and is not limited to text forms. It can be expressed as image, sound also. This information is distributed through a networked environment called the World-Wide-Web.
Hypertext is the ordinary text that has been dressed up with extra features, such as formatting images, multimedia and link to other documents.
Markup is the process of taking ordinary text and adding extra symbols. Each of the symbols used for markup in HTML is a command that tells a browser how to display the text.
Language is a key point to remember about HTML. It has its own syntax and rules for communication.
HTML files are stored with either ".htm" or ".html" extension.
1.1.1 Advantages of knowing HTML
1. Flexibility
You can always work on your Web site even if you are away from your computer.
2. Troubleshooting
Since you wrote the HTML, you will be able to troubleshoot it efficiently and have a
better idea of what techniques to try if something is not working.
3. Price
Using HTML does not cost you a cent. There are no expensive licenses to buy and no annoying upgrades to purchase.
4. Independence
You are not stuck to anyone vendor or anyone program.
1.2 HTML Overview
HTML is simply a collection of codes, which are called as elements. These are used to indicate the structure and format of a document. Elements in HTML consist of alphanumeric tokens within angle brackets. Most elements consist of paired tags: a start tag and an end tag.
Most tags come in pairs, but not all. HTML specifications define the type of content an element can enclose. This is known as an element's content model.
The content options include other elements, text or nothing at all. For example, the <HEAD> element provides general information about an HTML document.
Its content model allows elements such as <TITLE> and <META>. The control model for the bold element <B> allows text and some other elements like <I>.
The content model for break element <BR> encloses no content so it is said to be empty.
HTML start tag can sometimes contain attributes that modify the element's meaning. Attribute is separated from element by at least one space. Attributes indicate an effect by assigning values to their names. Thus, a complete HTML element is defined by a start tag, an end tag if applicable" possible attributes and a content model. The figure 1 shows overview of the syntax of the typical HTML element.
1.3 Understanding HTML
HTML and the Web were first conceived in 1989 by a researcher named Tim Berners-Lee who worked for CERN. The Web pioneers, led by Berners-Berners-Lee, regrouped into the World Wide Web Consortium (W3C) in 1994. The W3C is now responsible for the standards of HTTP, HTML and other Web- technologies but they don't control HTML. Vendors such as Microsoft, Netscape, Hewlett-Packard and Sun work with W3C to develop HTML.
The first version of HTML was called HTML not HTML 1.0. Then next versions were HTML+, HTML 2.0, HTML 3.2 and the latest HTML 4.0.
1.4 HTML Rules
1.HTML documents are structured documents.It defines what elements a document can contain, their possible relationships to one another within a document and possible attributes and values. If the elements in an actual HTML document agree with this definition, the document is said to be valid.
2.Element names are not case sensitive. An element like <html> or <Html> or
<HTML> is equivalent. Convention suggests that uppercase is the preferred practice.
3.Attribute names are not case sensitive.
4.Attribute values may be case sensitive. The value of an attribute may be case sensitive, if it refers to a file. The filename in <IMG SRC="filename.gif'> may not be the same as the filename in <IMG SRC="FILENAME.GIF">, it depends on the
operating system.
5.Element names cannot contain spaces.
6.Attribute values may contain spaces if the value is enclosed by quotes.
7.Browsers collapse and ignore space characters in HTML content.
8.HTML document may contain comments. Comments are denoted by a start value of <! - - and an end value of - ->. Comments can be many lines long. There are no spaces between the dashes or exclamation point in the comment.
9.An element that encloses the start tag of another element must also enclose its end tag,if exists. For example, use <B><I>Correct</I></B> and not <B><I>Not correct </B></I>. No No major browsers at this time have a problem with this. But you are advised to nest tags rather than cross them.
10.Browsers ignore unknown elements.
1.5 The Structure of HTML Document
An HTML document begins with a <!DOCTYPE> declaration indicating the version of HTML used by the document. Following this, the <HTML> element encloses the actual document. It contains two primary sections: the head and the body enclosed respectively by <HEAD> and <BODY> elements. The
<HEAD> contains other identifying and other meta-information about the document. It always contains the document's title, enclosed by the <TITLE>
element. The <BODY> contains the actual document content.
Eg :
<!DOCTYPE HTML PUBLIC "html version">
<HTML>
1.6 Document Types
A DTD defines the actual elements, attributes and element relationships that are valid in the document. The <!DOCTYPE> declaration allows to identify the HTML DTD being followed in the document. Also verifies that the document is syntactically correct.
The <!DOCTYPE> declaration is shown as :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1.7 The HTML Element
HTML document should be contained within <HTML> element. The element is contained within <HTML> start tag and </HTML> end tag. The purpose of this element is to declare that your document is an HTML document. The <!DOCTYPE>
declaration precedes the <HTML> tag and defines exactly what version of HTML you are using.
1.8 The HEAD Element
The HEAD element is used to mark the position of the head section. The head section contains elements that define certain information about an HTML document like Title, The author name etc. The head elements includes <HEAD>
start tag and </HEAD> end tag.
1.8.1 The TITLE Element
permitted in the TITLE element. So the following code is invalid:<TITLE>Unauthorized<B>Web Site</B></TITLE>
1.8.2 The META Element
The META element is used to present document meta-information i.e.
information about the document itself. This tag includes NAME, HTTP-EQUIV, CONTENT attributes.
Using NAME attribute - One common use of a named meta tag is to indicate authorship.
<META NAME="AUTHOR" CONTENT="JANAN PLATT">
This tells the software programs as well as people viewing your document's source that the document was written by Janan Platt. Another use of it is to indicate what program was used to create the HTML document.
<META NAME="GENERATOR" CONTENT="MOZILLA/4.01 [en] [win95][Netscape]">
This Meta tag indicates that the document was 'generated' by the English
version of Netscape Composer 4.01 on the Windows 95 platform.
Using HTTP-EQUIV attribute
The REFRESH attribute value allows a page to specify that the browser should retrieve a new page after a certain number of seconds. The common name for this feature is meta refresh.
<META HTTP-EQUIV="REFRESH" CONTENT="lO; URL="URL name">
This tag tells the browser to wait 1 0 seconds and retrieve the specified URL.
1.9 The BODY Element
The body element contains body section: start with a <BODY> tag and end with
</BODY> tag. Anything in the body section is displayed by the browser when you view the document. With BODY element you can use BGCOLOR, BACKGROUND and TEXT attributes. You can use either a color name or RGB value for BGCOLOR attribute value. The BACKGROUND attribute names a URL or file for an image that will be used as a background for the page. The TEXT attribute is used to set the foreground or text color of the page. There are two basic categories of HTML elements used in the body section.
• Block level Element
• Text level Element
Block level elements are used to define groups of text for a specific role, such as a form, a table, a heading.
Text level elements are for marking up bits of text like creating links, inserting images and changing the appearance of the text (bold, italic).
The main functional difference between these two types of elements is that text level elements don't cause line breaks, but block level elements do cause. Text level elements can contain other text level elements but not block level elements.
1.9.1 The Block level Elements
Block level elements include tags that position text on the page, begin new paragraphs, set heading levels and create a lists. Some commonly used elements and their tags are given below.
Paragraph: <P> and </P>
Heading, level 1 to 6: <H1> and </H1 >
Horizontal rule: <HR>
Centering: <CENTER>
1.9.2 The Text level Elements
Some commonly used text level elements are given below.
Bold: <B> and </B>
Italic: <I> and <iI>
Line break: <BR>
link Anchor: <A HREF="URl"> and </A>
Image: <IMG SRC="URl">