Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
HTML Articles
Page 145 of 151
How do we set the alignment according to surrounding elements in HTML?
Use the align attribute to set the alignment. You can try to run the following code to implement align attribute in HTML −Note − The align attribute deprecated in HTML5. Use CSS instead.Example A right-aligned paragraph. Note: The align attribute is not supported in HTML5. Use CSS instead.
Read MoreHow to specify where to send the form-data when a form is submitted in HTML?
Use the action attribute to add the file, where you want to reach after clicking Submit button. You can also add an email to send the data to that email-id.ExampleYou can try to run the following code to set where to send the form-data when a form is submitted in HTML − Student Contact Form Student Name: Student Subject:
Read MoreHow do we create preformatted text in HTML?
Use the tag to create preformatted text. Note − The tag deprecated.ExampleYou can try to run the following code to learn how to create preformatted text in HTML − HTML xmp Tag HTML tags include for bold text, for italic text.
Read MoreHow to indicate a potential word break point within a <nobr> section in HTML?
The HTML tag defines a potential line breakpoint if needed. This stands for Word Break Opportunity.ExampleYou can try to run the following code to learn how to implement tag in HTML − HTML wbr Tag The browser to extend the document window beyond the size of the viewing pane and the poor user must scroll right
Read MorePage build in HTML and wanted to load into JS view in SAPUI5 application.
The most commonly used way of doing this is to embed the HTML page as an iframe. Here is the example.new sap.ui.core.HTML({ preferDOM: true, content: "" });It can also be loaded using AJAX call or display using sap.ui.core.HTML, but it will depend upon your HTML page.
Read MoreHow to draw circle in HTML page?
To draw a circle in HTML page, use SVG or canvas. You can also draw it using CSS, with the border-radius property. Example You can try to run the following code to learn how to draw a circle in HTML #circle { width: 50px; height: 50px; -webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px; background: blue; }
Read MoreHow to use GoJS HTML5 Canvas Library for drawing diagrams and graphs?
GoJS is a JavaScript library, which you can use to implement interactive diagrams. This page will show you the essentials of using GoJS. If you want to add diagrams and graphs, then use this library, which is Open Source.GoJS has a model-view architecture, in which Models holds arrays of JavaScript objects, which describe nodes and links. To visualize this data using actual Node and Link objects, the Diagrams act as views.Constructing a Diagram with GoJS creates an HTML5 Canvas element to be placed inside the given DIV element.How to draw a diagramStart working with GoJS, you need to declare the ...
Read MoreMake HTML5 Canvas fill the whole page
To make canvas fill the whole page, you need to be 100% in width and height of the page.* { margin: 0; padding: 0; } body, html { height:100%; } #canvas { position:absolute; height:100%; width:100%; }
Read MoreHTML5 Cross Browser iframe post message - child to parent?
The parent object provides a reference to the main window from the child.The following is the parent code. The directive below triggers the iFrame to send a message to the parent window every 3 seconds. No initial message from the main window needed!var a= window.addEventListener ? "addEventListener" : "attachEvent";// here a is the event method var b= window[a];// here b is the eventer var c= a== "attachEvent" ? "onmessage" : "message";// here c is the message event // Listen to message from child window b (c, function(e) { var d= e.message ? "message" : "data";// here d is ...
Read MoreZoom HTML5 Canvas to Mouse Cursor
The canvas always scales from its current origin. The default origin is [0, 0]. If you want to scale from another point, you can first do ctx.translate(desiredX, desiredY);. This will reset the origin of the canvas to [desiredX, desiredY].The translate() method remaps the (0, 0) position on the canvas. The scale() method scales the current drawing, bigger or smaller. If you want to translate() the canvas context by your offset, you need to first scale() it to zoom in or out, and then translate() back by the opposite of the mouse offset.These steps are given in the following examplectx.translate(pt.x, pt.y); ...
Read More