How to specify Font Size, Color and Style (Font) in HTML

How to specify Font Size, Color and Style (Font) in HTML

A. Understanding HTML

HTML or which stands for Hypertext Mark Up Language is a standard programming language for creating a website that can be accessed by the internet. In other words, the web pages that we see and read are compiled using this language and then translated by computers so that they can be understood by users. Html is a standard for making websites widely so that website pages can be displayed on a computer screen.


Html is compiled with certain codes and symbols that are inserted into a file or document. So every time you open any website using a browser, the web is created using html.


B. HTML Functions

Html which is known as a programming language in computer science has several functions, including the following:


1. The main function of html that is known is to create a web page that can be read and understood by users more easily. All web pages on the internet are made with html and there are no exceptions.

2. Marking text on a page, html is written on a document page with certain tags or symbols where the symbols and tags will mark the text as bold, italic, underlined and so on. For example, if we make text italic or italic, in the html page we write the code <i>, <b> for bold text and <u> for underlined text.

3. As the basis of the website, the website that is created must have several features made using java script (to regulate web behavior), implementation of the PHP server programming language, and web design using CSS. All of these languages can be applied if the web has html language as its base.

4. View tables, images, videos, and more. Usually in websites or blogs we cannot directly put tables, pictures or videos, therefore these components are placed on the web using the html language.

5. Marking elements and creating online forms, html also functions to mark parts of the website including header, main, footer, navigation and so on. In addition, html is also usually used as a language in creating an online form or digital form.


C. How to Set Size, Color and Font Style in HTML


It's the same with us working on Microsoft Word or Open Office and other writing typing software, we can arrange the writing according to what we need or want. We can set the size, type, writing style and more.

The same with HTML can also be like that, it's just that we have to enter the tags we need, while the software I mentioned earlier has available options and buttons that make it easier for us.


To set the font in HTML you can use the <FONT> tag and the closing </FONT> tag. This tag has several attributes to set the formatting style of a text.

1. Font Size

DATA HOSTED WITH ♥ BY PASTEBIN.COM - DOWNLOAD RAW - SEE ORIGINAL
  1.     <!DOCTYPE html>
  2.     <html>
  3.     <head>
  4.      <title>Ukuran Font</title>
  5.     </head>
  6.     <body>
  7.      <font size="1">ini adalah ukuran Font 1</font><br>
  8.      <font size="2">ini adalah ukuran Font 2</font><br>
  9.      <font size="3">ini adalah ukuran Font 3</font><br>
  10.      <font size="4">ini adalah ukuran Font 4</font><br>
  11.      <font size="5">ini adalah ukuran Font 5</font><br>
  12.      <font size="6">ini adalah ukuran Font 6</font><br>
  13.       < font size = "7">ini adalah ukuran Font 7</ font><br>
  14.     </body>
  15.     </html>



Size=n is an attribute used to set the font size. The value of n ranges from 0 (the smallest size) to the largest 7. For more details, write the following code and save it with the name size_font.html.

2. Font Type

To set the font type you can use the face attribute with the face=string syntax. The string value is a string indicating the name of the font and usually more than one. Type the following code to find out the result of writing the font type, then save it with the name type_font.html.

DATA HOSTED WITH ♥ BY PASTEBIN.COM - DOWNLOAD RAW - SEE ORIGINAL
  1.     <!DOCTYPE html>
  2.     <html>
  3.     <head>
  4.      <title>Jenis Font</title>
  5.     </head>
  6.     <body>
  7.      <font face="Tahoma">Ini adalah jenis tulisan Tahoma</font><br>
  8.      <font face="Arial">Ini adalah jenis tulisan Arial</font><br>
  9.      <font face="Courier New">Ini adalah jenis tulisan Courier New</font><br>
  10.      <font face="Century Gothic">Ini adalah jenis tulisan Century Gothic</font><br>
  11.      <font face="Times New Roman">Ini adalah jenis tulisan Times New Roman</font>
  12.     </body>
  13.     </html>

3. Font Color

To set the font color you can use the color attribute with the syntax color= #RRGGBB. The RRGGBB value is a combination of numbers in hexa numbers indicating the capacity of the red (RR), green (GG), and blue (BB) colors. You can also replace #RRGGBB with an existing browser color constant.

For more details, please type the following code and save it with the name font_color.html.

DATA HOSTED WITH ♥ BY PASTEBIN.COM - DOWNLOAD RAW - SEE ORIGINAL
  1.     <!DOCTYPE html>
  2.     <html>
  3.     <head>
  4.      <title>Warna Tulisan</title>
  5.     </head>
  6.     <body>
  7.      <font color="black">Ini Adalah Warna Hitam</font><br>
  8.      <font color="blue">Ini Adalah Warna Biru</font><br>
  9.      <font color="red">Ini Adalah Warna Biru</font><br>
  10.      <font color="green">Ini Adalah Warna Hijau</font><br>
  11.      <font color="yellow">Ini Adalah Warna Kuning</font><br>
  12.      <font color="purple">Ini Adalah Warna Ungu</font><br><hr>
  13.      <font color="#ffffff">Ini Adalah Warna Putih</font><br>
  14.      <font color="#000000">Ini Adalah Warna Hitam</font><br>
  15.      <font color="#f0f0g88f">Ini Adalah Warna Pink</font>
  16.     </body>
  17.     </html>

So how…? do you now understand How to set the Size, Color and Font type in HTML? Maybe that's the only article that discusses How to Set Size, Color and Font Style (Font) in HTML.


Post a Comment

Previous Post Next Post