Adding HTML5 Validation to Visual Studio

Sravani S
Updated on 29-Jan-2020 10:25:41

649 Views

For HTML5 validation, you need to install IntelliSense and validation support to Visual Studio. HTML5 is supported by Visual Studio 2012.VS 2010 had IntelliSense support, but VS 2012 added corresponding snippets making it fast and easy to write markup.Follow the steps: Launch Visual Studio 2012 Go to Tools > Options menu When Options configuration screen is displayed, go to Text Editor > HTML > Validation.

Usage of Section and Article Elements in HTML

Nitya Raut
Updated on 29-Jan-2020 10:24:41

151 Views

The elements and are useful for screenreaders as well and help visually impaired users in reading the content of your web page. These are beneficial for eBook readers as well.Let us see how to work with both the elements.           HTML Section Tag                        Java          Inheritance          Inheritance defines the relationship between superclass and subclass.                              Learning          Learn to gain experience and try to share your knowledge with others.                       Web Development Tutorials             Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.                                 Academic Tutorials             Consist of Computer Fundamental, Computer Network tutorials for             1st Semester exams.                    

Cross-Origin Attribute in HTML5

karthikeya Boyini
Updated on 29-Jan-2020 10:23:18

223 Views

Yes, the official specification states cross-origin attribute as:The crossorigin attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas.You can use it to solve JavaScript errors like to log js errors:if (securityOrigin()->canRequest(targetUrl)) {    msg = myErroe;    line = myLineNumber;    source = sourceURL; } else {    msg = "Error!";    source = String();    line = 0; }

HTML5 Preload Attribute

Anvi Jain
Updated on 29-Jan-2020 10:22:10

156 Views

To prevent HTML5 video from loading before playing, use preload attribute. You can try to run the following code:                                        Your browser does not support the video tag.          

Positioning HTML5 SVG in the Center of Screen

Sravani S
Updated on 29-Jan-2020 10:20:13

358 Views

To center SVG, add the following CSS:# svgelem {    margin-left:auto;    margin-right:auto;    display:block; }The following is our SVG:    

HTML5 File Blob slice Method

Samual Sam
Updated on 29-Jan-2020 10:19:14

327 Views

The HTML5 file Blob.slice() method is useful for creating a Blob object containing the data. This data is in the specified range of bytes of the source Blob.Let us see an example to send and receive binary data using slice(). This example sends a text and uses the POST method to send the "file" to the server:var val = new XMLHttpRequest(); val.open("POST", url, true); val.onload = function (event) { }; var blob = new Blob(['demo'], {type: 'text/plain'}); val.send(blob);

Working with Polygon Tag in HTML5

Lakshmi Srinivas
Updated on 29-Jan-2020 10:18:39

277 Views

You can try to run the following code to learn how to work with the tag in HTML5:                    #svgelem{             position: relative;             left: 50%;             -webkit-transform: translateX(-40%);             -ms-transform: translateX(-40%);             transform: translateX(-40%);          }             SVG                     HTML5 SVG Star                      

Draw Large Font on HTML5 Canvas

karthikeya Boyini
Updated on 29-Jan-2020 10:17:56

253 Views

To draw large font properly in HTML5 Canvas, you can try to run the following code:var myCanvas = document.getElementById("myCanvas"); var context = c.getContext("2d"); context.font = '180pt Georgia'; context.strokeStyle = "#FF0000"; context.fillStyle = "#FFFFFF "; context.lineWidth = 34; context.fillText("Demo!",0,200); context.strokeText("Demo!",0,200);

Display Rupee Symbol in HTML

Govinda Sai
Updated on 29-Jan-2020 10:16:56

2K+ Views

The rupee symbol is the following and not every browser supports it:₹To make it visible on your web page: You can use the following as well:₹

Composition Attribute in HTML5 Canvas

Jennifer Nicholas
Updated on 29-Jan-2020 10:16:39

252 Views

HTML5 canvas provides compositing attribute globalCompositeOperation that affect all the drawing operations.                    var compositeTypes = [             'source-over','source-in','source-out','source-atop',             'destination-over','destination-in','destination-out',             'destination-atop','lighter','darker','copy','xor'          ];          function drawShape(){             for (i = 0; i < compositeTypes.length; i++){                var label = document.createTextNode(compositeTypes[i]);                document.getElementById('lab'+i).appendChild(label);                var ctx = document.getElementById('tut'+i).getContext('2d');                // draw rectangle                ctx.fillStyle = "#FF3366";                ctx.fillRect(15,15,70,70);                // set composite property                ctx.globalCompositeOperation = compositeTypes[i];                // draw circle                ctx.fillStyle = "#0066FF";                ctx.beginPath();                ctx.arc(75,75,35,0,Math.PI*2,true);                ctx.fill();             }          }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

Advertisements