mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): move lang attribute to step1 in bookstore page workshop (#65172)
This commit is contained in:
+9
-1
@@ -14,6 +14,8 @@ Start your bookstore page by creating the HTML boilerplate.
|
||||
|
||||
Add the `<!DOCTYPE html>` declaration and `html` and `head` elements.
|
||||
|
||||
Add a `lang` attribute to the `html` element and set it to `"en"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your code should include a `<!DOCTYPE html>` declaration.
|
||||
@@ -25,7 +27,13 @@ assert.match(code, /<!DOCTYPE html>/i);
|
||||
Your code should include both opening and closing `<html>` tags.
|
||||
|
||||
```js
|
||||
assert.match(code,/<html>[\s\S]*<\/html>/i);
|
||||
assert.match(code,/<html\b[^>]*>[\s\S]*<\/html>/i);
|
||||
```
|
||||
|
||||
Your `html` element should have a `lang` attribute set to `"en"`.
|
||||
|
||||
```js
|
||||
assert.match(code, /<html[^>]*\blang\s*=\s*["']en["'][^>]*>/i);
|
||||
```
|
||||
|
||||
Your code should include both opening and closing `<head>` tags.
|
||||
|
||||
+2
-8
@@ -9,18 +9,12 @@ dashedName: step-3
|
||||
|
||||
Now, improve the structure of your HTML document to ensure your page is encoded correctly.
|
||||
|
||||
Add a `lang` attribute to the `html` element and set it to `"en"`. Then, inside the `head` element add the `<meta charset="UTF-8">` element.
|
||||
Inside the `head` element, add the `<meta charset="UTF-8">` element.
|
||||
|
||||
Lastly, add a `body` element below the `head` section. This is where all of your visible page content will go.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your `html` element should have a `lang` attribute set to `"en"`.
|
||||
|
||||
```js
|
||||
assert.match(code, /<html[^>]*\blang=["']en["'][^>]*>/i);
|
||||
```
|
||||
|
||||
Your code should include a `<meta charset="UTF-8">` element.
|
||||
|
||||
```js
|
||||
@@ -45,7 +39,7 @@ assert.match(code, /<\/head>[\s\S]*<body>[\s\S]*<\/body>[\s\S]*<\/html>/i);
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
--fcc-editable-region--
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>XYZ Bookstore Page</title>
|
||||
</head>
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ assert.match(code, /<head>[\s\S]*<title>[\s\S]*<\/title>[\s\S]*<\/head>/i);
|
||||
```html
|
||||
--fcc-editable-region--
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user