How To Change Font Size In Html

Table of contents:

How To Change Font Size In Html
How To Change Font Size In Html

Video: How To Change Font Size In Html

Video: How To Change Font Size In Html
Video: Font Type, Font Size changing in HTML - Lesson 2 2024, November
Anonim

One of the main requirements for the design of web pages is the competent structuring of texts and the combination of elements of text content with different font sizes. There are several handy tools available in HTML and CSS for this.

How to change font size in html
How to change font size in html

Instructions

Step 1

Website design in the so-called academic style is used less and less, giving way to more advanced web page design, which uses the capabilities of cascading style sheets and standard tools of later versions of HTML. One of the most important indicators of a high-quality design is the competent combination of various text styles on the page, including displaying it in several dimensional variations. This HTML feature allows you to structure the text in the best way, emphasizing the necessary areas and displaying the planned hierarchy of text content. There are several ways to change the font size in HTML.

Step 2

One working but outdated way to change the font in HTML is to apply attributes to the main and special tags. An example of a descriptor that can be used to set the size and other parameters of a font in HTML is a tag. This tag appears between the inline tags that enclose the text. The tag is paired, and several descriptors can be used within one inline tag. The font size is controlled by the SIZE attribute, the numeric value of which specifies the font size in default units.

Step 3

Using a single tag, you can set the size and other parameters of the text not on local areas, but on the entire page. If this tag is specified within descriptors, the text parameters will be set for the entire page, and the tags will not lose their relevance. If it is written between tags, it will set the font parameters for all text that is located in the page code below the descriptor itself. This tag can be specified several times, and each subsequent descriptor will change the formatting of the fragment following it.

Step 4

The most convenient and correct method for changing the font size on a page is to use CSS tools when assigning styles directly to an array of an HTML document, or through an included CSS file. In this case, it is better to enclose the formatted fragment in a tag with an assigned class or identifier specified as a selector in the included CSS table or within tags. The font size is controlled by the FONT SIZE property with the numeric value assigned to it.

Recommended: