Found 2556 Articles for HTML

How to set background image of a webpage?

Alankritha Ammu
Updated on 09-Sep-2023 23:37:45

29K+ Views

Beautiful webpages are a very strong means of catching user attention. In this article, we are going to see how we can add an image as the background image of a web. Approach There are two approaches to setting an image as the webpage's background image, which we will learn in this article. They are − Using background attribute Using CSS Method 1: Using background attribute We can use the background attribute in the body tag to set an image as the background of the webpage. We will need to specify the URL or the location of the image ... Read More

How to set Text alignment in HTML?

Sharon Christine
Updated on 29-Aug-2023 07:12:50

219K+ Views

To set text alignment in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS property text-align for the center, left, and right alignment. HTML5 do not support the align attribute of the tag, so the CSS style is used to set text alignment.Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet.ExampleYou can try to run the following code to set text ... Read More

How to set font color in HTML?

Lokesh Badavath
Updated on 29-Aug-2023 07:35:05

149K+ Views

We use the style attribute to set the font color in HTML. The style attribute specifies an inline style for an element, with the CSS color property. The attribute is used with the HTML tag, with the CSS color property. HTML5 do not support the tag, so the CSS style is used to add font color. The tag deprecated in HTML5. Syntax text… Example In the example below, we set the font color of the text inside the tag. DOCTYPE html> HTML Font color ... Read More

How to set background color in HTML?

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

230K+ 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 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

157K+ 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

1K+ 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

Advertisements