Found 2416 Articles for HTML

How to use the tag to define the base URL for an HTML page?

Lokesh Badavath
Updated on 19-Oct-2022 06:37:10

1K+ Views

In this article, we will learn how to use the tag to define the base URL for an HTML page. In HTML, different elements have attributes that contain link to the other resources. The values of these attributes are URL’s, these can be absolute or relative URL’s. The HTML element specifies the base URL to use for all relative URLs in a document. There can only be one single element in a document, and it must be placed inside the tag. The following are the attributes of the HTML tag − The tag must ... Read More

How to create a valid HTML document with no and element?

Amit Sharma
Updated on 15-Jun-2020 11:45:48

240 Views

With HTML, the essentials are doctype declaration, and . But, you will be amazed to know that a valid HTML document can work without the and element. The doctype declaration will come always since it tells and instructs the browser about what the page is about.Let’s see an example; here we won’t use the html> and element. Still, the HTML Document is valid and will work correctly like any other valid HTML Document − Title of the page This is heading 1 This is heading 2 This is a paragraph.

What are the different tags to define special meta information in HTML page?

Lokesh Badavath
Updated on 19-Oct-2022 07:09:39

235 Views

Metadata means information about data. The tag in HTML provides complete information about HTML Document. Adding the meta tag while making the webpage or website is a good practice because search engines use this meta tag to understand the information about the website. It is also helpful while searching for a specific website, then the result page will display in search results. These tags are basically used to add author name, value pairs to describe properties of HTML documents, such as expiry date, author name etc. i.e.., it is used to specify a character set, page description and viewport ... Read More

How to create a flexbox Layout in HTML?

Lokesh Badavath
Updated on 19-Oct-2022 06:17:51

757 Views

To create a flexbox layout in HTML, we use CSS Float. We have multiple layouts to show content on a web page. CSS Float is one of the ways to multi-column layouts. Flexbox layout introduced in CSS3. This layout helps in adjusting the screen size and to get displayed correctly on multiple display devices and makes the web page responsive. With the collapse of a margin of content, the flexbox does not collapse. It adjusts according to screen size. Here’s the flexbox layout, which you can easily create. On resizing the page, the following is visible. The page adjusts according ... Read More

How to create a floating Layout in HTML?

Lokesh Badavath
Updated on 19-Oct-2022 08:17:07

3K+ Views

Layout make the web pages look better and arrange the visual elements on web page. It establishes the overall appearance of the web page. The HTML Layouts specifies the arrangement of different components on a web page. There are many HTML elements that defines different section of a web page. Following are the HTML elements used for HTML layout − S.No. Attribute & Description 1 header It specifies a header for a section of the content on the web page. 2 section It represents a section of the content on web page. ... Read More

How do we use different CSS classes in HTML?

Lokesh Badavath
Updated on 19-Oct-2022 06:35:12

375 Views

We specify a class for an HTML element using the class attribute. Multiple HTML elements can share the same class. And using various attributes of the class, like changing colors, fonts, etc., we can define styles rules for these HTML elements. The elements having that class will be formatted according to the defined rule. This is known as class selector. For selecting elements with a specific class, you need to write a period (.) character, followed by the name of the class, for example, let us look at the “.black” class, .black { color: #000000; } ... Read More

How do we style HTML elements using the span tag ?

Lokesh Badavath
Updated on 19-Oct-2022 06:13:16

2K+ Views

We use tag to color a part of text or a part of the document. This tag is mainly used to group similar content together for easy styling. We use inline style for tag, as it applies a style to inline elements. If we want to make some text or any other content different from the rest, we wrap it in a tag, and add class attribute to identify, then add attribute value for styling. Syntax Following is the syntax for the tag. Text… Example 1 Given below is an example to style HTML ... Read More

How do we style HTML elements using the division tag
?

Lokesh Badavath
Updated on 19-Oct-2022 06:12:08

439 Views

The tag is used as the container for the HTML elements. With the help of this tag, we can easily define a section of a HTML Document. It is also used to group large sections of HTML elements together and easily format them. The tag is used with block-level elements. The tag accepts all the CSS properties and styles the elements in it using attributes like class and id. Syntax Following is the syntax for the tag. Content… Example 1 Given below is an example to add style to the division tag in HTML. ... Read More

How we can put three divisions

Lokesh Badavath
Updated on 19-Oct-2022 06:10:23

9K+ Views

The tag defines the division of the HTML document. This tag is mainly used to group similar content together for easy styling and also used as the container for the HTML elements. We use CSS property to place three divisions tags side by side in HTML. The CSS property float is used to achieve this. Syntax Following is the syntax for the tag. Content… Example 1 Following is the example to place three division classes side by side in HTML using CSS property. DOCTYPE html> ... Read More

How we can put two divisions

Lokesh Badavath
Updated on 19-Oct-2022 06:09:16

9K+ Views

The tag defines the division of the HTML document. This tag is mainly used to group similar content together for easy styling. It is also used as the container for the HTML elements, we can easily style this tag using the class or id attribute. We can place content inside the tag. Using CSS property, we can place two tags side by side in HTML. By styling we can place the two division classes side by side. Syntax Following is the syntax for the tag. Content… Example 1 Following is the example to place ... Read More

Advertisements