How To Increase The Font On Html

Table of contents:

How To Increase The Font On Html
How To Increase The Font On Html

Video: How To Increase The Font On Html

Video: How To Increase The Font On Html
Video: Font Type, Font Size changing in HTML - Lesson 2 2024, November
Anonim

Increasing the HTML font is possible using special tags that allow you to control the parameters of the text displayed on the screen. Similar display settings are implemented in CSS, the code of which can be easily integrated into the edited page.

How to increase the font on html
How to increase the font on html

To edit the original text of a document with the.html extension, open the text editor you are using (for example, "Notepad"). Click "File" - "Open" and specify the path to the page whose code you want to change. Then press the Enter key on your keyboard and start editing the desired section of the document.

Html

Changing the font size is done through the handle. Within the scope of this tag, you can set the necessary parameters for the height of the letters and their colors. The text enclosed between the opening and closing elements will be displayed in accordance with the settings made:

Any text

Letters that are written between and will have size 15 due to the given size parameter.

Save your changes to apply the parameters. You can close the editor window and double-click on the HTML page to open it in a browser window. You can also right-click on the document and select "Open With" to launch it in a web browser. Select your browser from the list of specified programs.

CSS

Using cascading style sheets allows you to fine-tune your font settings. With the help of code, you can change the display settings for both the entire text displayed on the page, and for individual elements (for example, headings). CSS can be specified in the body of the document (), but it is most convenient to write the necessary directives into the descriptor by enclosing the commands in a tag.

The font-size attribute is responsible for changing the font size parameters. The described value can be specified in pixels (px), points (pt) and percentages (%). For example:

Changing the font size

body {font-size: 13pt; }

h1 {font-size: 200%; }

p {font-size: 15px; }

In this example, the size for the text entered in the body of the page is 13 points. Any letters between the tags will be enlarged by 2 times (100% of the original size). The text specified between the descriptors will be 15 pixels. It should be noted that parameters set for each page element separately will take precedence over more general values. For example:

Regular paragraph font

Changed paragraph

As a rule, the text between tags should be 15px in size. However, the font in the second paragraph will be size 18, because the code in the body of the document usually takes precedence over the general settings in the.

Recommended: