freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-the-css-box-model-by-.../60a3e3396c7b40068ad6996a.md

1.1 KiB

id title challengeType dashedName
60a3e3396c7b40068ad6996a Step 1 0 step-1

--description--

Ormai dovresti avere familiarità con gli elementi di base di una pagina HTML.

Aggiungi la dichiarazione DOCTYPE e gli elementi html (specificando che la pagina è in inglese), head e body.

--hints--

Il codice dovrebbe includere un tag <!DOCTYPE html>.

assert(code.match(/<!DOCTYPE html>/i));

Dovresti avere un tag <html> di apertura con un attributo lang con il valore en.

assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi));

Il codice dovrebbe avere un elemento head all'interno dell'elemento html.

assert(document.querySelectorAll('head').length === 1);

Il codice dovrebbe avere un elemento body all'interno dell'elemento html.

assert(document.querySelectorAll('body').length === 1);

L'elemento head dovrebbe trovarsi prima dell'elemento body.

assert(document.querySelector('body').previousElementSibling.tagName === 'HEAD');

--seed--

--seed-contents--

--fcc-editable-region--

--fcc-editable-region--