HTML: промяна на шрифта - как работи
Свързани Видеоклипове: (Септември 2024).
В HTML можете да промените шрифта с обикновен маркер. Ще обясним как, но и защо CSS е по-добрият избор.
Промяна на шрифта в HTML
В HTML има така наречения шрифт таг. С този маркер можете да зададете шрифта, размера на шрифта или цвета на текст.
- Например, може да изглежда така: Здравейте, аз съм Arial !.
- На екрана можете да видите резултата от кодовия ред под заглавието "HTML". Друг пример в "Monospace".
- Маркерът обаче е остарял и вече не се поддържа в HTML5. Следователно трябва да използвате CSS или вграден CSS, както в примера.
- В този случай етикетът трябва да бъде структуриран по следния начин:
Здравейте, аз съм Arial!
, - Зад думата "стил" можете да поставите CSS код в HTML таг. Вие задавате шрифта тук с "font-family".
- Както можете да видите, този ден води до същия резултат, но вие сте доказали бъдещето с този метод.
Също така обясняваме как можете да зададете разстоянието между линиите с помощта на CSS.