Topics - For - Study - Final of Web Technologies
Topics - For - Study - Final of Web Technologies
1. IMG tag
Use the <img /> tag to place an image on your web page.
<img src="sunset.gif" />
2. HTML Comment
o A comment is a way for you as the web page developer to control what lines of code are to be
ignored by the web browser.
o Comment syntax may be a little complicated, there is an opening and a closing much like tags.
1. <!-- Opening Comment
2. -- > Closing Comment
====================================================================================================
CSS
1. Inline CSS
It is possible to place CSS right in your HTML code, and this method of CSS usage is
referred to as inline css.
o Inline CSS has the highest priority out of external, internal, and inline CSS.
o This means that you can override styles that are defined in external or internal by using
inline CSS.
o If you want to add a style inside an HTML element all you have to do is specify the desired
CSS properties with the style HTML attribute.
<p style="background: blue; color: white;">A new background andfont color with inline CSS</p>
2. External CSS
External Style Sheet
o When using CSS it is preferable to keep the CSS separate from your HTML.
o Placing CSS in a separate file allows the web designer to completely differentiate between
content (HTML) and design (CSS).
o External CSS is a file that contains only CSS code and is saved with a ".css" file extension.
o This CSS file is then referenced in your HTML using the <link> instead of <style>.
• There are lots of objects that descend from the document object forming a large sub-tree
known as the Document Object Model (DOM), which has become standardized.
• The document object represents the HTML displayed in window.
• Using this object it is possible to access information about the document itself and also about
the information content.
• Using this object it is possible to control certain parameters of the current document like
background, foreground and link colors.
switch(n)
{
case 1:
execute code block 1 break;
case 2:
execute code block 2 break;
default:
code to be executed if n is different from case 1 and 2
}
var x=Math.PI;
var y=Math.sqrt(16);
person=new Object();
person.firstname="Narendra";
person.lastname="Modi";
person.age=24;
person.eyecolor="blue";
d. JavaScript Operators.
Operator Name
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
= Assignment
• There are lots of objects that descend from the document object forming a large sub-
tree known as the Document Object Model (DOM), which has become standardized.
• The document object represents the HTML displayed in window.
• Using this object it is possible to access information about the document itself and
also about the information content.
• Using this object it is possible to control certain parameters of the current document
like background, foreground and link colors.
=========================================================================
XML
1. DTD Elements with data
o Elements with data are declared with the data type inside parentheses:
<!ELEMENT element-name (#CDATA)>
or
<!ELEMENT element-name (#PCDATA)>
or
<!ELEMENT element-name (ANY)>
example:
<!ELEMENT note (#PCDATA)>
o #CDATA means the element contains character data that is not supposed to be parsed by a
parser.
o #PCDATA means that the element contains data that IS going to be parsed by a parser.
o The keyword ANY declares an element with any content.
o If a #PCDATA section contains elements, these elements must also be declared.
2. EMPTY element
o Empty elements are declared with the keyword EMPTY inside the parentheses:
<!ELEMENT img (EMPTY)>
A complex element is an XML element that contains other elements and/or attributes.
· There are four kinds of complex elements:
o empty elements
o elements that contain only other elements
o elements that contain only text
o elements that contain both other elements and text
<date lang="norwegian">03.03.99</date>
ASP
1. HTML Controls
Controls Description
Name
File It is used to create a input type = "file" component which is used to upload file to the
server.
Password It is a password field which is used to get password from the user.
ListBox It displays a list of items to the user. You can set the size from two or more to specify
how many items you wish to show.
3. Web Controls
Following is a list of common web controls :
Label
Panel
Button
TextBox
CheckBox
RadioButton
RadioButtonList
ListBox
DropDownList
Table/TableRow/TableCell
DataGrid
DataList
Repeater
Calender
Validation controls
4. Global.asax.
In ASP.NET it is possible to specify the event-handlers that need to be invoked on the
occurrence of particular events. These event-handlers are defined in a global file by name
Global.asax. The Global.asax file of ASP.NET has a provision for the following event-
handlers
• Application_OnStart
• Application_OnEnd
• Session_OnStart
• Session_OnEnd
• Application_BeginRequest
• Security_OnAuthenticate
a) access modifiers in ASP.NET.
Access Modifiers
All types and type members have an accessibility level. The accessibility level controls
whether they can be used from other code in your assembly or other assemblies. Use the
following access modifiers to specify the accessibility of a type or member when you declare
it:
• Public: The type or member can be accessed by any other code in the same assembly or
another assembly that references it.
• Private: The type or member can be accessed only by code in the same class or struct.
• Protected: The type or member can be accessed only by code in the same class, or in a class
that is derived from that class.
• Internal: The type or member can be accessed by any code in the same assembly, but not
from another assembly.
• Protected internal: The type or member can be accessed by any code in the assembly in
which it's declared, or from within a derived class in another assembly.
• Private protected: The type or member can be accessed only within its declaring
assembly, by code in the same class or in a type that is derived from that class.
As shown, all Web clients communicate with ASP.NET applications through IIS. IIS deciphers the
request, authenticates, and finds the requested resource (such as an ASP.NET application). If
authorized, it returns the appropriate resource to the client. In addition to the built-in ASP.NET
security features, an ASP.NET application can use the Common Language Runtime low-level security
features.
&& Logical and Returns true if both statements are true x < 5 && x < 10
|| Logical or Returns true if one of the statements is true x < 5 || x < 4
! Logical not Reverse the result, returns false if the result is true !(x < 5 && x < 10)