Sunday, 22 April 2012

OUR EVENT-SOMETHING NEW

http://mozillamycampus.eventbrite.com/
www.eventbrite.com
What Mozilla MY Campus Tour #1 2012 - Universiti Utara Malaysia Wiki Mozilla Event : https://wiki.mozilla.org/Mozilla_MY_Campus_Tour Intro Mozilla is a fun, diverse community of people from around the world. You don't have to be a C++ guru (or even know what that means!...

Tuesday, 27 March 2012

28 HTML5 FEATURES

1. New Doctype

Still using that pesky, impossible-to-memorize XHTML doctype?
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

If so, why? Switch to the new HTML5 doctype. You’ll live longer — as Douglas Quaid might say.
  1. <!DOCTYPE html>

In fact, did you know that it truthfully isn’t even really necessary for HTML5? However, it’s used for current, and older browsers that require a specified doctype. Browsers that do not understand this doctype will simply render the contained markup in standards mode. So, without worry, feel free to throw caution to the wind, and embrace the new HTML5 doctype.

2. The Figure Element

  1. <figure>
  2. <img src="path/to/image" alt="About image" />
  3. <figcaption>
  4. <p>This is an image of something interesting. </p>
  5. </figcaption>
  6. </figure> 
3. <small> Redefined

The small element now refers to “small print

4. No More Types for Scripts and Links 

You possibly still add the type attribute to your link and script tags.
  1. <link rel="stylesheet" href="path/to/stylesheet.css" type="text/css" />
  2. <script type="text/javascript" src="path/to/script.js"></script>
This is no longer necessary. It’s implied that both of these tags refer to stylesheets and scripts, respectively. As such, we can remove the type attribute all together.
  1. <link rel="stylesheet" href="path/to/stylesheet.css" />
  2. <script src="path/to/script.js"></script> 

5. To Quote or Not to Quote

<p class=myClass id=someId> Start the reactor. 

6. Make your Content Editable

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>untitled</title>
  6. </head>
  7. <body>
  8. <h2> To-Do List </h2>
  9. <ul contenteditable="true">
  10. <li> Break mechanical cab driver. </li>
  11. <li> Drive to abandoned factory
  12. <li> Watch video of self </li>
  13. </ul>
  14. </body>
  15. </html>

7. Email Inputs

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>untitled</title>
  6. </head>
  7. <body>
  8. <form action="" method="get">
  9. <label for="email">Email:</label>
  10. <input id="email" name="email" type="email" />
  11. <button type="submit"> Submit Form </button>
  12. </form>
  13. </body>
  14. </html> 
Email Validation

8. Placeholders

<input name="email" type="email" placeholder="doug@givethesepeopleair.com" /> 
Validation

9.   Local Storage
 Support matrix

10 The Semantic Header and Footer
Gone are the days of:
 
  1. <div id="header">
  2. ...
  3. </div>
  4. <div id="footer">
  5. ...
  6. </div>
Divs, by nature, have no semantic structure — even after an id is applied. Now, with HTML5, we have access to the <header> and <footer> elements. The mark-up above can now be replaced with:
 
  1. <header>
  2. ...
  3. </header>
  4. <footer>
  5. ...
  6. </footer> 

11. More HTML5 Form Features

12. Internet Explorer and HTML5
In order to ensure that the new HTML5 elements render correctly as block level elements, it’s necessary at this time to style them as such.
 
  1. header, footer, article, section, nav, menu, hgroup {
  2. display: block;
  3. }
Unfortunately, Internet Explorer will still ignore these stylings, because it has no clue what, as an example, the header element even is. Luckily, there is an easy fix:
 
  1. document.createElement("article");
  2. document.createElement("footer");
  3. document.createElement("header");
  4. document.createElement("hgroup");
  5. document.createElement("nav");
  6. document.createElement("menu");
Strangely enough, this code seems to trigger Internet Explorer. To simply this process for each new application, Remy Sharp created a script, commonly referred to as the HTML5 shiv. This script also fixes some printing issues as well.
 
  1. <!--[if IE]>
  2. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  3. <![endif]-->


13. hgroup

  1. <header>
  2. <hgroup>
  3. <h1> Recall Fan Page </h1>
  4. <h2> Only for people who want the memory of a lifetime. </h2>
  5. </hgroup>
  6. </header> 

14. Required Attribute

  1. <form method="post" action="">
  2. <label for="someInput"> Your Name: </label>
  3. <input type="text" id="someInput" name="someInput" placeholder="Douglas Quaid" required>
  4. <button type="submit">Go</button>
  5. </form> 
Required and Placeholder Attributes

15. Autofocus Attribute  

<input type="text" name="someInput" placeholder="Douglas Quaid" required autofocus> 

16. Audio Support
  1. <audio autoplay="autoplay" controls="controls"> 
  1. <source src="file.ogg" />
  2. <source src="file.mp3" />
  3. <a href="file.mp3">Download this file.</a>
  4. </audio>

17.  Video Support

  1. <video controls preload>
  2. <source src="cohagenPhoneCall.ogv" type="video/ogg; codecs='vorbis, theora'" />
  3. <source src="cohagenPhoneCall.mp4" type="video/mp4; 'codecs='avc1.42E01E, mp4a.40.2'" />
  4. <p> Your browser is old. <a href="cohagenPhoneCall.mp4">Download this video instead.</a> </p>
  5. </video> 

18. Preload Videos
The preload attribute does exactly what you’d guess. Though, with that said, you should first decide whether or not you want the browser to preload the video. Is it necessary? Perhaps, if the visitor accesses a page, which is specifically made to display a video, you should definitely preload the video, and save the visitor a bit of waiting time. Videos can be preloaded by setting preload="preload", or by simply adding preload. I prefer the latter solution; it’s a bit less redundant

19. Display Controls
If you’re working along with each of these tips and techniques, you might have noticed that, with the code above, the video above appears to be only an image, without any controls. To render these play controls, we must specify the controls attribute within the video element.
 
  1. <video preload controls> 

20. Regular Expressions

  1. <form action="" method="post">
  2. <label for="username">Create a Username: </label>
  3. <input type="text"
  4. name="username"
  5. id="username"
  6. placeholder="4 <> 10"
  7. pattern="[A-Za-z]{4,10}"
  8. autofocus
  9. required>
  10. <button type="submit">Go </button>
  11. </form>

21. Detect Support for Attributes

alert( 'pattern' in document.createElement('input') ) // boolean; 

22. Mark Element

  1. <h3> Search Results </h3>
  2. <p> They were interrupted, just after Quato said, <mark>"Open your Mind"</mark>. </p> 
23.When to Use a <div>
if you find that you need to wrap a block of code within a wrapper element specifically for the purpose of positioning the content, a <div> makes perfect sense. However, if you’re instead wrapping a new blog post, or, perhaps, a list of links in your footer, consider using the <article> and <nav> elements, respectively. They’re more semantic.

24. What to Immediately Begin Using
With all this talk about HTML5 not being complete until 2022, many people disregard it entirely – which is a big mistake. In fact, there are a handful of HTML5 features that we can use in all our projects right now! Simpler, cleaner code is always a good thing.

25. What is Not HTML5
  1. SVG: Not HTML5. It’s at least five years old.
  2. CSS3: Not HTML5. It’s…CSS.
  3. Geolocation: Not HTML5.
  4. Client Storage: Not HTML5. It was at one point, but was removed from the spec, due to the fact that many worried that it, as a whole, was becoming too complicated. It now has its own specification.
  5. Web Sockets: Not HTML5. Again, was exported to its own specification.

26. The Data Attribute

We now officially have support for custom attributes within all HTML elements. While, before, we could still get away with things like:
 
  1. <h1 id=someId customAttribute=value> Thank you, Tony. </h1>
…the validators would kick up a fuss! But now, as long as we preface our custom attribute with “data,” we can officially use this method. If you’ve ever found yourself attaching important data to something like a class attribute, probably for JavaScript usage, this will come as a big help!

HTML Snippet

 
  1. <div id="myDiv" data-custom-attr="My Value"> Bla Bla </div>

Retrieve Value of the Custom Attribute

 
  1. var theDiv = document.getElementById('myDiv');
  2. var attr = theDiv.getAttribute('data-custom-attr');
  3. alert(attr); // My Val
It can also even be used in your CSS, like for this silly and lame CSS text changing example.
 
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Sort of Lame CSS Text Changing</title>
  6. <style>
  7. h1 { position: relative; }
  8. h1:hover { color: transparent; }
  9. h1:hover:after {
  10. content: attr(data-hover-response);
  11. color: black;
  12. position: absolute;
  13. left: 0;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <h1 data-hover-response="I Said Don't Touch Me!"> Don't Touch Me </h1>
  19. </body>
  20. </html>

27. The Output Element

  1. form action="" method="get">
  2. <p>
  3. 10 + 5 = <output name="sum"></output>
  4. </p>
  5. <button type="submit"> Calculate </button>
  6. </form>
  7. <script>
  8. (function() {
  9. var f = document.forms[0];
  10. if ( typeof f['sum'] !== 'undefined' ) {
  11. f.addEventListener('submit', function(e) {
  12. f['sum'].value = 15;
  13. e.preventDefault();
  14. }, false);
  15. }
  16. else { alert('Your browser is not ready yet.'); }
  17. })();
  18. </script>

28. Create Sliders with the Range Input

    Step 1: Mark-up
           
  1. <form method="post">
  2. <h1> Total Recall Awesomness Gauge </h1>
  3. <input type="range" name="range" min="0" max="10" step="1" value="">
  4. <output name="result"> </output>
  5. </form> 

    Step 2: CSS
           
         
  1. body {
  2. font-family: 'Myriad-Pro', 'myriad', helvetica, arial, sans-serif;
  3. text-align: center;
  4. }
  5. input { font-size: 14px; font-weight: bold; }
  6. input[type=range]:before { content: attr(min); padding-right: 5px; }
  7. input[type=range]:after { content: attr(max); padding-left: 5px;}
  8. output {
  9. display: block;
  10. font-size: 5.5em;
  11. font-weight: bold;
  12. }

       Step 3: The JavaScript

          
  1. (function() {
  2. var f = document.forms[0],
  3. range = f['range'],
  4. result = f['result'],
  5. cachedRangeValue = localStorage.rangeValue ? localStorage.rangeValue : 5;
  6. // Determine if browser is one of the cool kids that
  7. // recognizes the range input.
  8. var o = document.createElement('input');
  9. o.type = 'range';
  10. if ( o.type === 'text' ) alert('Sorry. Your browser is not cool enough yet. Try the latest Opera.');
  11. // Set initial values of the input and ouput elements to
  12. // either what's stored locally, or the number 5.
  13. range.value = cachedRangeValue;
  14. result.value = cachedRangeValue;
  15. // When the user makes a selection, update local storage.
  16. range.addEventListener("mouseup", function() {
  17. alert("The selected value was " + range.value + ". I am using local storage to remember the value. Refresh and check on a modern browser.");
  18. localStorage ? (localStorage.rangeValue = range.value) : alert("Save data to database or something instead.");
  19. }, false);
  20. // Display chosen value when sliding.
  21. range.addEventListener("change", function() {
  22. result.value = range.value;
  23. }, false);
  24. })();




Friday, 23 March 2012

5 EXCITING THINGS TO LOOK FORWARD TO IN HTML 5

1. New HTML elements that improve our ability to describe content


HTML's primary task is to describe the structure of a web page. For example, by enclosing text between <p></p> elements, HTML tells the browser that the text between those elements is a paragraph.



2. Improved web forms handling

The most exciting thing about Web Forms 2.0 is form validation. Currently, developers are required to use JavaScript (client-side) or PHP (server-side) code to validate inputs. For example, many web forms contain required fields (perhaps for the username and email fields):



3. APIs for easier web application development

HTML 5 will introduce several application programming interfaces (APIs) to new and existing elements, aimed at improving web application development and addressing current issues with HTML 4's lack of ability to allow developers to mark up web applications.
One API is specifically for working with audio and video and will be used with the <audio> and <video> elements. It will provide audio and video playback capabilities and eliminate the need to use third-party applications, such as Flash, to develop and display media (at least for supported media files).



4. The <canvas> element allows image scripting on the fly

Most people take in information more quickly and effectively through visuals. For example, between a table, numerical data, and a pie chart, the pie chart gives users a better feel for the scale and relationship of data (at least most of the time).

The downside of images is that they're static. If you create a pie chart using a traditional method (for example, with an image editor like Photoshop, or a graphing application like Excel), you wouldn't be able to adjust any data that changes without manually editing your graphics.
With the <canvas> element, you can take constantly changing (database-driven) data and apply it to a pie chart like the one above, as well as other types of 2D visuals (even a cat, if you're so inclined), via scripting.
The canvas API also allows users to interact with <canvas> elements. For example, you can write a script that responds to users' clicking on a particular section of the pie chart.



5. Users can edit and interact with sections of a web page

The section in the proposed HTML 5 specifications about User Interaction describes new ways of marking up interactive web pages. The contenteditable attribute (a boolean attribute to which you assign either true or false) allows you to indicate which parts of a web page users can change.
This can be useful for wiki-style websites, in which content is user-generated. Another use of the contenteditable attribute would be to create web page templates. You can allow certain regions of a web page to be open to content editing and lock other regions that shouldn't be changed. This gives users of your website who aren't proficient in HTML an opportunity to input content safely without affecting critical areas that should be handled by more knowledgeable users.
At the document level, you can make an entire page editable via the designMode attribute, which accepts two values: on or off.

Saturday, 17 March 2012

MY NEW WEBPAGE

I had done my own webpage in my 1st lab class. I thank my lecture Mr.Adib that had guide me in html coding. I also thank my fren Saeed who guide me the ways to upload the webpage in server. Here is the link MY WEBPAGE

Sunday, 4 March 2012

ABOUT TODAY'S CLASS

Today I learned about "HTML". Before this I had done project using this. But just some coding copy and paste and sometimes do know why the syntax are used. Buut this is the time for me learned the real way of using it in today's class. I'm really proud to have Mr.Adib as my lecturer. Thak you so much for your teaching sir.

Wednesday, 29 February 2012

WHAT WE LEARNED TODAY?

today we learned about web application development that contains of network models. that is TCP/IP and about the architectures. finally we learned about "www" that is worl widw web. today was interesting class for me till i had learned many thing from my lecturer mr.adib. thank you so much lecturer..

Monday, 27 February 2012

WHAT ARE THE BENEFIT OF WEB APPLICATION?

A web application relieves the developer of the responsibility of building a client for a specific type of computer or a specific operating system. Since the client runs in a web browser, the user could be using an IBM-compatible or a Mac. They can be running Windows XP or Windows Vista. They can even be using Internet Explorer or Firefox, though some applications require a specific web browser.
Web applications commonly use a combination of server-side script (ASP, PHP, etc) and client-side script (HTML, Javascript, etc.) to develop the application. The client-side script deals with the presentation of the information while the server-side script deals with all the hard stuff like storing and retrieving the information.http://video.about.com/webtrends/Twitter-Etiquette-Tips-.htm