Свойства CSS: Как установить верхнее поле для элемента абзаца
Перейти на страницу упражнений
Решение:
HTML-код:
<!DOCTYPE html>
<html>
<head>
<title>How to set the top margin for a paragraph element</title>
<style type="text/css">
p.w3r {
margin-top: 2cm;
}
</style>
</head>
<body>
<p>CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.</p>
<p class="w3r">CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.</p>
<p>CSS, stands for Cascading Style Sheet is a computer language to describe presentation (for example width, height, color, background color, alignment etc.) of HTML and XML (and XML based languages like XHTML, SVG) web documents. In all the examples of our tutorials, we have used HTML for implementing CSS.</p>
</body>
</html>
Демонстрация в реальном времени:
См. Pen margin-top-answer от w3resource ( @ w3resource ) в CodePen .
Поддерживаемый браузер
да | да | да | да | да |
Каков уровень сложности этого упражнения?
Новый контент: Composer: менеджер зависимостей для PHP , R программирования
disqus2code