Define the Head and Body of an HTML Document for challenge solution (#35826)

* Define the Head and Body of an HTML Document for challenge solution

* edit on check the body tag contain h1 and p tags
This commit is contained in:
RIHANE ZAKARIA 2019-05-06 16:44:57 +02:00 committed by Oliver Eyton-Williams
parent cde8035b79
commit a40451feaa

View File

@ -33,8 +33,8 @@ tests:
testString: assert($('html').children('body').length == 1, 'The <code>body</code> element should be a child of the <code>html</code> element.');
- text: The <code>head</code> element should wrap around the <code>title</code> element.
testString: assert(code.match(/<head>\s*?<title>\s*?.*?\s*?<\/title>\s*?<\/head>/gi), 'The <code>head</code> element should wrap around the <code>title</code> element.');
- text: The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.
testString: assert($('body').children('h1').length == 1 && $('body').children('p').length == 1, 'The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.');
- text: The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> .
testString: assert(code.match(/<body>\s*?(((<h1>\s*?.*?\s*?<\/h1>\s*?)(<p>(.*\s*)*?<\/p>\s*?))|((<p>\s*?.*?\s*?<\/p>\s*?)(<h1>(.*\s*)*?<\/h1>\s*?)))<\/body>/gi), 'The <code>body</code> element should wrap around both the <code>h1</code>and <code>p</code> elements');
```