Свойства CSS: Как установить левое поле для элемента абзаца
Перейти на страницу упражнений
Решение:
HTML-код:
<!DOCTYPE html>
<html>
<head>
<title>How to set the left margin for a paragraph element</title>
<style type="text/css">
p.w3r {
margin-left: 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 -left-answer от w3resource ( @ w3resource ) на CodePen .
Поддерживаемый браузер
да | да | да | да | да |
Каков уровень сложности этого упражнения?
Новый контент: Composer: менеджер зависимостей для PHP , R программирования
disqus2code