,
1.a) Discuss Lists and Table Elements Lists
AI-enhanced title and description
Unordered Lists • Unordered lists are specified with the <UL> tag. • Unordered lists are used when the order of the list items is unimportant. • The type attribute defines the type of bullets used to denote the individual list items. • The three options are: disc, circle and square.Example<UL type="disc"><LH> UG Courses </LH><LI> BE (CSE) </LI><LI> BE (ECE) </LI><LI> BE (EEE) </LI></UL><UL type="square"><LH> PG Courses </LH><LI> MCA </LI><LI> ME (CSE) </LI><LI> MBA </LI></UL>Ordered Lists • Ordered lists are specified with the <OL> tag. • They are used when the order of the list item is significant. • OL elements have the type and start attributes. • The type attribute selects the kinds of numbering system utilized to order the list.Example<html><body><h4>An Ordered List:</h4><ol type=I> <li>Coffee</li> <li>Tea</li> <li>Milk</li></ol></body></html>Definition Lists • Definition lists are specified with the <DL> tag. • Definition lists consist of pairs of values, the first being the term to be defined, and the second being the definition of the tem. • Example <DL> <DT> Satellite Dish <DD> Antenna like device which functions to receive and concentrate television signals.Nested Lists • Any kind of list – ordered, unordered or definition – can be nested within another list. <UL type=disc> <LI> UG COurses </LI> <OL type=i> <LI> BE (CSE) </LI> <LI> BE (ECE) </LI> <LI> BE (EEE) </LI> </OL> <LI> PG COurses </LI> <OL type=i> <LI> ME (CSE) </LI> <LI> MCA </LI> <LI> MBA </LI> </OL> </UL>
Attribute Description
You probably noticed those ugly gray lines that appear between the frames. It is possible toremove these and manipulate the spacing between frames with frameborder and framespacing.These attributes appear within the frameset tag.
HTML - ImagesImages are a staple of any web designer, so it is very important that you understand how to usethem properly. Use the <img /> tag to place an image on your web page.<img src="sunset.gif" />HTML - Image srcAbove we have defined the src attribute. Src stands for source, the source of the image or moreappropriately, where the picture file is located. As with links described in a previous lesson, youmay use any standard URL to properly point the src attribute to a local or external source.There are two ways to define the source of an image. First you may use a standard URL.(src=http://www.Tizag.com/pics/htmlT/sunset.gif) As your second choice, you may copy orupload the file onto your web server and access it locally using standard directory tree methods.(src="../sunset.gif") The location of this picture file is in relation to your location of your .htmlfile.
URL Types
2.valign (Vertical) top bottom center
<MARQUEE>
The marquee tag is a non-standard HTML element which causes text to scroll up, down, left orright automatically. Unlike its blinking counterpart, the marquee element has several attributesthat can be used to control and adjust the appearance of the marquee.
Align Uses the same syntax as the img element.Behavior Allows the user to set the behavior of the marquee to one of three different types: Scroll (default) – Scrolls the text from right-to-left, and restarts at the right side of the marquee when it has reached the left side. Text disappears when looping finishes. Slide – When used in absence of the 'Behavior' attribute, contents to be scrolled will slide the entire length of marquee but stops the moment it hits the end, so that the contents will be displayed. But if it is used with attribute 'Behavior' then the attribute 'Slide' will be ignored.
Loops are counted by each time it reaches each end of the marquee; a loop of 1 is different from'Slide' attribute. when item is being scrolled with 'Slide' attribute, item will stop permanently atthe end of length of the marquee, displaying the entire item. However, when an item is beingscrolled without a 'Loop' attribute, the number of scrolls will be repeated according to whatnumber 'Loop' is equal to. If 'Loop=1' then item will scroll only once and will exit the length ofmarquee completely, while the item being scrolled will stop would be the same as 'Slide'. Bydefault, 'Loop=infinite' so it is not needed to code the attribute 'Loop' is you want a non-stopscroll. Note: 'Loop' will be ignored if attribute 'Behavior' is coded. Also, if 'Behavior=Alternate'and 'Loop=2' then item will go from beginning of the Marquee to the end and back to thebeginning, counting a round trip as 2 loops.
Bgcolor Sets the background color of the marquee.Direction Sets the direction of the marquee box to either left-to-right, right-to-left, up-to-down and down-to-up.Width This sets how wide the marquee should be.Loop This sets how many times the marquee should 'Loop' its text. Each trip counts as one loop.Scrollamount This is how many pixels the text moves between 'frames'. So scrollamount=1 gives you the slowest scroll speed.Scrolldelay This sets the amount of time, in milliseconds, between 'frames'. Much like watching a replay of a video where every frame of the video would be paused for x number of miliseconds. So, 'Scrolldelay=1000' means a slow motion where every frame lasts one thousand miliseconds or one second.
Linking is where it's at in the World Wide Web. A website typically begins at a 'home' pagewhich contains links to other pages local to itself and pages that are somewhere else on theInternet. If you wish to provide a link to somewhere, then you use the <A HREF> tag. The Astands for Anchor, it is an anchor point in a document elsewhere. There are a number of ways tolink and these are described next.
Notice how that you have a little extra bit to the <A HREF> tag where you type in a description,in this case 'Intel's Website'. This text is enclosed within the whole <A HREF....</A> tag and isused by the browser to provide a 'click point'. This 'click point' is usually highlighted in aparticular colour such as blue (for unvisited) and red (for visited), this is your Hypertext Link.These colours can be changed within Cascading Style Sheets. TARGET="_blank" and call thenew page something like 'New Window'. For example <A HREF="http://www.intel.com/"TARGET="_blank">New Window</A>.
We don't have to go whizzing off across the world, we can link to another HTML document onthe Local Area Network or on your own hard disk.
Typing <A HREF="wwnever.htm">Never Never Land</A> gives you a link to Never NeverLand which is a another web page in the same directory as the current page. Click on it now! Ifthe page was in a directory called 'misc' then you would type <AHREF="misc\wwnever.htm"> instead.
One of the greatest strength of XML Schemas is the support for data types.
Another great strength about XML Schemas is that they are written in XML.
When sending data from a sender to a receiver, it is essential that both parts have the same"expectations" about the content.
The DOM represents a tree view of the XML document. The documentElement is the top-levelof the tree. This element has one or many childNodes that represent the branches of the tree.A Node Interface Model is used to access the individual elements in the node tree. As anexample, the childNodes property of the documentElement can be accessed with a for/eachconstruct to enumerate each individual node.
Javascript datatypes
DataTypes Numbers - are values that can be processed and calculated. You don't enclose them in quotation marks. The numbers can be either positive or negative. Strings - are a series of letters and numbers enclosed in quotation marks. JavaScript uses the string literally; it doesn't process it. You'll use strings for text you want displayed or values you want passed along. Boolean (true/false) - lets you evaluate whether a condition meets or does not meet specified criteria. Null - is an empty value. null is not the same as 0 -- 0 is a real, calculable number, whereas null is the absence of any value.
Data Types
TYPE EXAMPLE
Null A special keyword for exactly that – the null value (that is, nothing)
Integers
base 10, base 8 (octal), and base 16 (hexadecimal).
Base 8 numbers can have digits only up to 7, so a decimal value of 18 would be an octal value of22.
In order to distinguish between these three bases, JavaScript uses the following notation.
Decimal (base 10) A normal integer without a leading 0 (zero) (ie, 752)
Floating point values can include a fractional component. A floating-point literal includes adecimal integer plus either a decimal point and a fraction expressed as another decimal numberor an expression indicator and a type suffix
7.2945 -34.2 2e3 means 2 x 103 => 2000 2E-3 means 2 x 10-3 => .002
Floating point literals must, at a minimum, include a decimal integer and either the decimal pointor the exponent indicator ("e" or "E"). As with integers, floating point values can be positive ornegative.
Strings
Technically, a string literal contains zero or more characters enclosed, as you know, in single ordouble quotes:
"Hello!" ‘245’ "" // This example is called the empty string.
NOTE: the empty string is distinct from the null value in JavaScript.
NOTE: Strings are different from other data types in JavaScript. Strings are actually Objects.This will be covered later on.
Boolean
Note: Unlike Java, C and other languages, in JavaScript Boolean values can only be representedwith true and false. Values of 1 and 0 are not considered Boolean values in JavaScript.
Null Value
The null value is a special value in JavaScript. The null value represents just that – Nothing. Ifyou try to reference a variable that isn’t defined and therefore has no value, the value returned isthe null value. Likewise, with the prompt() dialog box, if the user selects the Cancel button, anull is returned. (example)
Beans Introspection
8Beans support introspection in two ways:– By adhering to specific rules, known as design patterns, when naming bean features– By explicitly providing property, method, and event information with a related beaninformation class.PropertiesProperties are the appearance and behavior characteristics of a bean that can be changed atdesign timeBeans expose properties so they can be customized at design time Builder tools introspect on a bean to discover its properties and expose those properties formanipulation Customization is supported in two ways:– by using property editors– by using more sophisticated bean customizers.
PersistencePersistence enables beans to save and restore their state After changing a bean's properties, youcan savethe state of the bean and restore that bean at a later time with the property changes intact .TheJavaBeans architecture uses Java Object Serialization to support persistence.
Eventsœ Beans use events to communicate with other beansœ A bean that is to receive events (a listener bean) registers with the bean that fires the event (asource bean)Builder tools can examine a bean and determine which events that bean can fire (send) andwhich it can handle (receive).
JavaBean Methodœ A bean's methods are no different from Java methods, and can be called from other beans or ascripting environmentœBy default all public methods are exported.
Examples of Beansœ GUI (graphical user interface) componentœ Non-visual beans, such as a spelling checkerœ Animation appletœ Spreadsheet application.
Propertiesœ A bean property is a named attribute of a bean that can affect its behavior or appearanceœ Examples of bean properties include color, label,font, font size, and display size.
Types of Propertiesœ Simple – A bean property with a single value whose changes are independent of changes inany other property.œ Indexed – A bean property that supports a range of values instead of a single value.œ Bound – A bean property for which a change to the property results in a notification being sentto some other bean.œ Constrained – A bean property for which a change to the property results in validation byanother bean. The other bean may reject the change if it is not appropriate.