--- id: 587d7791367417b2b2512ab3 title: Create Visual Balance Using the text-align Property challengeType: 0 videoUrl: '' localeTitle: 使用text-align属性创建视觉平衡 --- ## Description
本课程的这一部分侧重于应用视觉设计。第一组挑战建立在给定的卡布局上,以显示许多核心原则。文本通常是Web内容的很大一部分。 CSS有几个选项可以将它与text-align属性text-aligntext-align: justify;导致除最后一行之外的所有文本行都与行框的左右边缘相交。 text-align: center;文本text-align: right;右对齐文本和text-align: left; (默认值)左对齐文本。
## Instructions
h4标签的文本(称为“Google”)与中心对齐。然后证明段落标记是合理的,其中包含有关Google如何成立的信息。
## Tests
```yml tests: - text: 您的代码应使用h4标记上的text-align属性将其设置为居中。 testString: 'assert($("h4").css("text-align") == "center", "Your code should use the text-align property on the h4 tag to set it to center.");' - text: 您的代码应使用p标记上的text-align属性将其设置为对齐。 testString: 'assert($("p").css("text-align") == "justify", "Your code should use the text-align property on the p tag to set it to justify.");' ```
## Challenge Seed
```html

Google

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

```
## Solution
```js // solution required ```