HTML Articles

Page 145 of 151

How do we set the alignment according to surrounding elements in HTML?

Anvi Jain
Anvi Jain
Updated on 02-Mar-2020 742 Views

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 More

How to specify where to send the form-data when a form is submitted in HTML?

George John
George John
Updated on 02-Mar-2020 685 Views

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 More

How do we create preformatted text in HTML?

Chandu yadav
Chandu yadav
Updated on 02-Mar-2020 217 Views

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 More

How to indicate a potential word break point within a <nobr> section in HTML?

usharani
usharani
Updated on 02-Mar-2020 180 Views

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 More

Page build in HTML and wanted to load into JS view in SAPUI5 application.

Ali
Ali
Updated on 25-Feb-2020 619 Views

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 More

How to draw circle in HTML page?

Smita Kapse
Smita Kapse
Updated on 25-Feb-2020 10K+ Views

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 More

How to use GoJS HTML5 Canvas Library for drawing diagrams and graphs?

Nancy Den
Nancy Den
Updated on 25-Feb-2020 580 Views

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 More

Make HTML5 Canvas fill the whole page

Chandu yadav
Chandu yadav
Updated on 27-Jan-2020 3K+ Views

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 More

HTML5 Cross Browser iframe post message - child to parent?

George John
George John
Updated on 24-Jan-2020 233 Views

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 More

Zoom HTML5 Canvas to Mouse Cursor

Ankith Reddy
Ankith Reddy
Updated on 24-Jan-2020 1K+ Views

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
Showing 1441–1450 of 1,508 articles
« Prev 1 143 144 145 146 147 151 Next »
Advertisements