Decoration of a web page and font size in HTML

Decoration of a web page and font size in HTML

Beginning web designers will be useful to know about the ways in which the text of the web page is designed. These include alignment, color, font size and much more.

Several tags are associated with formatting. The most commonly used "p"- paragraph. It has optional parameters that specify the appearance of the text.

font sizeThe first and main parameter is "align". It defines the alignment of the text and can take the values ​​"left", "right", "center" and "justify" -alignment on the left side, on the right, center and along the entire width of the block, respectively. Note that the position of the text is not set with respect to the screen borders, but within the paragraph.

Next comes the "class" and "id" parameters, which determine which class the object belongs to and its identifier, including the "style" attribute,-it sets the built-in block style. All these properties are related to CSS, which we will discuss below.

The tag "p"there is one drawback - it can not be usedSpecify the appearance of the font, for example, its color or size. For these purposes, another tag is intended - "font". All its parameters determine how the text will look.

html font sizeThe first attribute of this tag is "color". As you guessed it, the color is set in it. This parameter can accept both names ("white", "yellow", "magenta"), and values ​​in the RGB system. This is done like this: first put the sign of #, and then specify three numbers in hexadecimal notation from 00 to ff or from 0 to 255 - in decimal - the number of red, green and blue in the final color. For example, to use red color, you need to write "# ff0000", yellow - "# ffff00".

The next attribute is "face". It defines the font headset. For example, you can set it to "Times New Roman" or "Tahoma".

And, finally, the "size" parameter is responsible for the font size in HTML. It takes a numerical value - a size.

For example, to print the text in blue and the font "Comic Sans MS" of the fifteenth pin, you need to define the tag "p" with the parameters:

color = "# 6666ff" face = "Comic Sans MS" size = "15"

font size in htmlThere are also several tags that allow you to specify one particular type of formatting: "b" - bold, "i" - italic, "u" - underscore. All of them have no parameters.

Specify text attributes in HTML - font size,headset - quite uncomfortable. Imagine that you need to alternate blocks with different text design. Then to each of the tags you will have to define the same attributes. It is much more convenient to implement this using CSS-cascading style sheets. For example, to create a picture class called "myclass" with the same design as in the previous example, you would add the following line to the "style" tag:

#myclass {font: rgb (102,102,255) "Comic Sans MS" 15pt;}

Here "rgb (102,102,255)" sets the color, "ComicSans MS "is the headset, and" 15pt "is the font size, you can also set the color with the name, and the font in both the pins and the pixels (for example, write" 20px ").

To apply this design, you need to write in the tag "p":

class = "myclass"

The same way you can draw any other text. It is enough to set the parameter "class"with the value of the class that you want to use.

And to create an identifier with the name "myid", you need to write in "style":

#myid {font: rgb (102,102,255) "Comic Sans MS" 15pt;},

and in the "p" tag set the "id" attribute with the value "myid".

Class and identifier are almost the same. In this case, one tag can be declared as either the first or the second:

class = "myclass" id = "myid"

There are two ways to change the appearancetext - HTML and CSS. If you need to design one or two blocks, then use HTML. And for a large number of paragraphs with the same formatting, CSS is more convenient.

As you can see, changing the font size in HTML is not difficult.

Related news

  • Device for lip augmentation: advertising promises and real feedback
  • Object 730. Heavy Tank T-10. Soviet heavy tank
  • What does a shark dream about Should I beware of this dream
  • The magic and meaning of the name Nazar
  • The sights of the Chelyabinsk region - Lake Arakul
  • Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML Decoration of a web page and font size in HTML