Found 10711 Articles for Web Development

How to arguments object with Rest, default, and destructured parameters in JavaScript?

Abhinaya
Updated on 15-Jun-2020 13:19:37

88 Views

defaultThis came to handle function parameters with ease. Easily set Default parameters to allow initializing formal parameters with default values. This is possible only if no value or undefined is passed. Let’s see an exampleExampleLive Demo                    // default is set to 1          function inc(val1, inc = 1) {             return val1 + inc;          }          document.write(inc(10, 10));          document.write("");          document.write(inc(10));           restES6 ... Read More

How to set background color in HTML?

Lokesh Badavath
Updated on 29-Aug-2023 07:08:04

234K+ Views

Setting the background color of a web page or an element on the web page, enable us to create unique layouts for the web page. To set the background color in HTML, use the style attribute, with the CSS property background-color inside the body tag of the HTML document. HTML5 do not support the tag bgcolor attribute, so the CSS style is used to add background color. The bgcolor attribute deprecated in HTML5. We can change the background color by overriding the property with the other property. Syntax Example Following is the example program to set background ... Read More

How to concatenate multiple string variables in JavaScript?

Shubham Vora
Updated on 08-Aug-2022 11:38:55

17K+ Views

In this tutorial, we will learn to concatenate the multiple string variables in JavaScript. It’s many times needed that we need to concatenate two strings in a single variable and use it. The simple meaning of concatenation is to merge two or multiple strings. Also, string concatenation is useful to insert some substring in the parent string. For example, while developing the application, as a programmer, you need to update the string by adding some other extra string to it. Users can split the string first and insert the substring using the concatenation operation. There are various methods to merge ... Read More

How to create a link to send email in HTML?

Lokesh Badavath
Updated on 18-Nov-2022 09:53:52

2K+ Views

We use HTML tag defines a hyperlink used to link web pages. The href attribute of the tag, which indicates the link's destination. Which provides us option to specify an email address. To create a link to send mail we use mailto:to specify email address inside href attribute in HTML. Syntax Following is the syntax to link a mail address to the web page. xx@gmail.com Same as the way we link a mobile number. We use mailto instead of tel inside a href attribute. Example Following is the example program to link a mail address to the ... Read More

Why do we use head tag in HTML Page?

Lokesh Badavath
Updated on 11-Nov-2022 08:15:36

2K+ Views

The tag is a container for all the head elements in an HTML page. We use … tag to add it to HTML page. head tag contains the title of the document, styles, scripts, and other HTML elements. The element is a container for metadata-data about data and is placed between the … tag. The following elements can go inside the element − − Use in every HTML page defines the title of the content. − Used to apply a simple style to HTML document − Specify a default URL and a default ... Read More

How to Insert Hyperlink in HTML Page?

Bhanu Priya
Updated on 05-Oct-2023 12:18:46

159K+ Views

To insert a hyperlink in a HTML page, we have to utilize the anchor tags and labels, which are used to characterize the connections. The tag demonstrates where the hyperlink begins and the < / a> tag shows where it closes. Whatever text gets added inside these labels, will function as a hyperlink. Add the URL for the connection in the Following is the usage of hyperlinks − < html> ... -- text < / a> In the HTML, ... Read More

How to use image height and width attribute in HTML Page?

Lokesh Badavath
Updated on 11-Nov-2022 08:13:37

2K+ Views

Images make content more interesting by helping readers to understand the content better on the web page. We can insert images into the HTML page. To insert image in an HTML page, use the tags. It is an empty tag, containing only attributes since the closing tag is not required. The src attribute is used to add the image source which is the URL of the image(location of the file). The alt attribute is for adding alternate text, width is for adding width, and height is for adding the height of the image. We use style attribute to ... Read More

How to use href attribute in HTML Page?

Lokesh Badavath
Updated on 11-Nov-2022 08:11:28

2K+ Views

The href attribute specifies the URL of the page the link goes to (href attribute specifies the link's destination). We should use href attribute with tag so it will be a hyperlink. This tag should be used inside the … tags. Syntax Following is the syntax for the tag, which uses href attribute to specify the link address. link text Example Following is the example program to use href attribute in an HTML page. DOCTYPE html> Click this to navigate to the Brave home page How ... Read More

What is horizontal rule in HTML Page?

Lokesh Badavath
Updated on 21-Nov-2023 21:06:13

1K+ Views

The tag defines a break in an HTML page, or it is used to separate content in an HTML page using a horizontal line and is most often displayed as a horizontal rule. The tag defines a break with the horizontal line in an HTML page. The tag is an empty element. It only has an opening tag i.e, . Syntax Following is the syntax for the tag. ... Example Following is the example program, which uses tag to separate content on the web page. DOCTYPE html> LOK SABHA ... Read More

How to Insert an Image in HTML Page?

Lokesh Badavath
Updated on 31-Aug-2023 02:18:20

90K+ Views

Images make content more interesting by helping readers understand the content better on the web page. We can insert images into the HTML page. To insert image in an HTML page, use the tags. It is an empty tag, containing only attributes since the closing tag is not required. We should use the tag inside … tag. The tag specifies an image to be displayed in an HTML document. The src attribute is used to add the image source which is the URL of the image(location of the file). The alt attribute is for adding alternate ... Read More

Advertisements