
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2202 Articles for HTML

187 Views
In order to speed up creation and edition of HTML, splitting of HTML files are required into three separate HTML files −HeaderFooterContentThis is not possible in a static Html website; however, this is possible through PHP. Another way is to use JavaScript to load page pieces after the main page is already loaded.

140 Views
The event source is just a web socket that -That cannot send data Uses text or event stream format It fires events that are server definedIt is useful in applications that only need server push.Web sockets are good for applications that need fast communications in both directions.Another major difference is the different security models they used.Server Send events are useful for −Live Feeds Live Scores Stock Market Update

124 Views
There is no description in HTML5 specification, which says deletion of a getContext property by the script is valid.We can write a code in which we delete getContext property of HTMLCanvasElement and then in the separate statement we make it undefined.Delete window.HTMLCanvasElement.prototype.getContext; _assertSame(window.HTMLCanvasElement.prototype.getContext, undefined, "window.HTMLCanvasElement.prototype.getContext", "undefined");

890 Views
When there is a requirement to pull down the screen to refresh the page to get latest updates, this can be done with the help of JavaScript, xhttprequests and then touch events.Pull refresh is a trigger to XHR in AJAX .It adds new data to the element we want.Pull refresh can be implemented with the help of hijacked JavaScript scrolling mechanism like iscroll. Twitter is using iscroll to pull refresh option.Another way is to create a refresh handler for overflow:scroll components.The interface provided can give an idea about the handler interface −var PullToRefresh= function(callback, wrapper, instructionsText) { //It ... Read More

433 Views
When we draw anything on Canvas, it keeps no memory of anything that was drawn. While drawing we need to keep track of all the necessary information yourself as we draw. Therefore, it is not feasible to get value from HTML5 canvas to JavaScript as it keeps no memory. It just draws like this −On adding a function for button and clicking on it, you won’t be able to get what you want − You will not be able to get those values from the canvas since the canvas is just a bitmap.

477 Views
The arc() function has the following definition that shows the usage of start and ends angle −arc(x, y, radius, startAngle, endAngle, anticlockwise)This method has the following parameters −x and y are coordinates of the circle’s center.Radius is the circle radiusStartAngle and EndAngle define the start and endpoints of the arc in radians. Starting and closing angles are measured from the horizontal i.e. x-axisAnticlockwise is the Boolean value which when true draws arc anticlockwise otherwise in a clockwise direction.

73 Views
Posts can be selected using div with ‘id=post’. This will select all div elements with an id which contains a value in quotes.We can use either −div[id*='post-'] { ... } or div[id^='post-'] { ... }.div[id*='post-'] { ... } will select all div elements with id which is having all values in quotes.Or we can use,div[id^='post-'] { ... }This will select all div elements with an id which started with quotes.

705 Views
If you want to use HTML5 canvas to draw shapes, texts and curves and also want to attach traditional DOM events like onClick or drag and drop functions, a crossbar framework Raphael is used for doing drag and drop or touch events.This technology uses SVG and XML for older versions of IE. Drag and drag using HTML is shown below. Example Raphaël · Drag-n-drop ... Read More

435 Views
When there is a circle drawn on canvas and we put red color on half and grey color on a portion of a circle, then on clicking a red color, we call function1.On clicking grey part, function 2 is called and we need to use reusable path objects to store different parts, which we want to test. Click handler can be used to share the canvas and do our desired work. Path2D objects can be used to store path information.var path1 = new Path2D(); var path2 = new Path2D(); var newpaths = [path1, path 2]; // Array is ... Read More

186 Views
Shorthand is used to decide which option is selected on pageload of razor Html.DropDownListFor(). You can try to run the following code snippet −// return Boolean value @Html.DropDownListFor(m => m.Valeur, new List< SelectListItem > { //new list item list item1 is generated new SelectListItem { Value = "0" , Text = "Show", Selected = Model.Valeur == 0 }, new SelectListItem { Value = "1" , Text = "Hide", Selected = Model.Valeur != 0 }, }, new { @class = “selectnew" })