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.
Next are the "class" and "id" parameters. They determine which class this object and its identifier belong to. This also includes 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.
The next attribute is "face". It defines the typeface font. For example, it can be given the value "Times New Roman" or "Tahoma".
And finally, the size parameter in HTML is responsible for the size parameter. It takes a numeric value - size.
For example, to display text in blue and in the "Comic Sans MS" font of the fifteenth point, you need to define the "p" tag with the parameters:
color = "# 6666ff" face = "Comic Sans MS" size = "15"
Set text attributes in HTML - font size,Headset - quite uncomfortable. Imagine that you need to alternate blocks with different types of text. Then for each of the tags you will have to define the same attributes. Much more conveniently, this can be implemented using CSS – cascading style sheets. For example, to create a class of pictures called "myclass" with a design like the previous example, 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 "- a headset, and" 15pt "- the font size. Color can also be set by name, and the font - both in pins and pixels (for this you need to write, for example," 20px ").
To use this design you need to write in the tag "p":
class = "myclass"
In the same way you can arrange any other text. It is enough to set the parameter "class" with the value of the class you want to use.
And to create an identifier with the name "myid", you need to write in the "style":
#myid {font: rgb (102,102,255) "Comic Sans MS" 15pt;},
and in the tag "p" set the attribute "id" with the value "myid".
Class and ID are almost the same. In this case, one tag can have both the first and second tags declared:
class = "myclass" id = "myid"
There are two ways to change the appearanceText - HTML and CSS. If you need to make one or two blocks, 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 a snap. The main thing in programming is practice, so try to train more, and you will succeed!