Web-конструирование |
|||||
Содержание: HTML CSS JavaScript |
|
<P style="font: 12pt Courier New"> The text in this line will display as 12 point text using the Courier New font. </P> |
Или:
<p style="font: 12pt Arial"> The text in this line will display as 18 point text using the Arial font. </p> |
The text in this line will display as 12 point text using the Courier New font.
The text in this line will display as 18 point text using the Arial font.
Mожно добавлять встроенный стиль в любой тег HTML, в котором эта операция будет иметь смысл. Среди таких тегов можно назвать абзацы, заголовки, горизонтальные линии, якоря и ячейки таблиц. Ко всем этим элементам логично применять встроенные стили.Вот пример работы тега <div>:
<div style="font-family: Garamond; font-size: 18 pt;>"AII of the text within this section is 18 point Garamond. |
и тега <span>:
<span style="color:#ff3300;"> This text appears in the color red, with no line break after the closing span tag </span> and the rest of the text. |
Cовет
Хотя встроенные стили довольно полезны - гораздо лучше разрабатывать стандартные стили для всего Web-узла и затем применять их, используя внедренные или связанные таблицы стилей.