Found 2417 Articles for HTML

HTML cite Attribute

George John
Updated on 30-Jul-2019 22:30:26

131 Views

The cite attribute of the element sets a URL to the HTML document and states why a specific text was deleted. Following is the syntax −Here, url is the link that displays the address of the document wherein it is specified why the text was deleted. Let us now see an example to implement the cite attribute of the element −Example Live Demo Subjects to Learn    JavaScript    A scripting language.    Java    It is a programming language.    jQuery    A JavaScript library.    C#    Object-oriented programming language. Internal Exams from 3rd May ... Read More

HTML cite Attribute

Ankith Reddy
Updated on 30-Jul-2019 22:30:26

136 Views

The cite attribute of the element is used to set a URL that specified the reason to insert the text. Following is the syntax −Above, we have set url, which is the address to the document explaining the reason to insert the text. Let us now see an example to implement the cite attribute of the element −Example Live Demo Demo Heading Text is inserted. OutputIn the above example, we have inserted a text using the element −    Text is inserted. Above, we have set the reason of insertion using the cite attribute −cite="new.htm

HTML hreflang Attribute

Chandu yadav
Updated on 30-Jul-2019 22:30:26

137 Views

The hreflang attribute of the element is used to set the language of the url in the area. Following is the syntax −Above, code is the ISO language code set for the language, for example, en for English, fr for French, js for Japanese, etc. Let us now see an example to implement the hreflang attribute for the element −Example Live Demo Learning Learn these technologies with ease....             OutputIn the above example, we have set the map on the following image −Now, we have set the map and ... Read More

HTML canvas strokeStyle Property

George John
Updated on 30-Jul-2019 22:30:26

313 Views

The strokeStyle property in HTML canvas is used to set the color, gradient or pattern for the stroke. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −context.strokeStyle=color|gradient|pattern;Above, the values, include −color − The stroke color of the drawing.gradient − Linear or radial gradient object to create gradient strokepattern − The pattern object to create pattern stroke.Let us now see an example to implement the strokeStyle property of canvas −Example Live Demo   ... Read More

HTML coords Attribute

Arjun Thakur
Updated on 30-Jul-2019 22:30:26

421 Views

The cords attribute of the element is used to set the coordinates of area in image map. Use the attribute with shape attribute and set the size & shape of an area.Following is the syntaxUnder the value above, you can set the following coordinates with different parameters −x1, y1, x2, y2Coordinates of the top-left and bottom-right corner of the rectangle (shape="rect")x, y, radiusCoordinates of the circle center and the radius (shape="circle")x1, y1, x2, y2, .., xn, ynCoordinates of the edges of the polygon.Let us now see an example to implement the cords attribute of the element −Example Live Demo ... Read More

HTML

Anvi Jain
Updated on 30-Jul-2019 22:30:26

583 Views

The value attribute of the element is used to set the initial value of a button. You can set this in a . Here, we will be showing an example without using a form.Following is the syntax −Above, value is the initial value.Let us now see an example to implement value attribute in −Example Live Demo Click below to get details about the learning content... Get Tutorials Get InterviewQA    function demo1() {       var val1 = document.getElementById("button1").value;       document.getElementById("myid").innerHTML = val1;    }    function demo2() {       ... Read More

HTML datetime Attribute

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

196 Views

The datetime attribute of the element is used to specify the date and time displaying when the text was inserted.Following is the syntax −Above, the attribute datatime displays the datetime when the text was inserted in the following format −YYYY - yearMM - monthDD - day of the monthhh - hourmm - minutesss - secondsTZD - Time Zone DesignatorLet us now see an example to implement the datetime attribute of the element −Example Live Demo    Demo Heading    Text is inserted. OutputIn the above example, we have inserted a text using the element − ... Read More

HTML checked Attribute

Smita Kapse
Updated on 10-Jun-2020 07:15:29

200 Views

The checked attribute of the element specifies that the input type checkbox is checked when the web page loads. You can also use this attribute with input type radio.Following is the syntax −Above, we have set it checked since we wanted the checkbox to be selected when the web page loads.Let us now see an example to implement the checked attribute of the element −Example Live Demo Register Id:  Password:  DOB:  Telephone:  Email:  Newsletter Subscription:  Submit OutputIn the above example, we have a form with a button − Id:  Password:  DOB:  Telephone:  Email:  Newsletter ... Read More

HTML Color Styles

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

254 Views

Colors are very important to give a good look and feel to your website.Hex Code (Hexadecimal colors representation)A hexadecimal is a 6 digit representation of a color. The first two digits (RR) represent a red value, the next two are a green value(GG), and the last are the blue value(BB).A hexadecimal value can be taken from any graphics software like Adobe Photoshop. Each hexadecimal code will be preceded by a pound or hash sign #. Following is a list of few colors using hexadecimal notation. Following are some examples of hexadecimal colors −Let us see an example to implement the ... Read More

How to create JLabel to hold multiline of text using HTML in Java?

Samual Sam
Updated on 30-Jul-2019 22:30:26

736 Views

To hold multiline of text, set HTML under JLabel −JLabel = new JLabel("" + "Line1Line2",JLabel.LEFT);The above will create multiline text in the JLabel −Line1 Line2The following is an example to create JLabel to hold multiline of text −Exampleimport java.awt.Font; import javax.swing.*; public class SwingDemo {    public static void main(String args[]) {       JFrame frame = new JFrame("Label Example");       JLabel label;       label = new JLabel("" + "Line1       Line2",JLabel.LEFT);       label.setBounds(100, 100, 100, 30);       label.setFont(new Font("Verdana", Font.PLAIN, 13));       frame.add(label);       frame.setSize(500,300);       frame.setLayout(null);       frame.setVisible(true);    } }Output

Advertisements