freeCodeCamp/curriculum/challenges/portuguese/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-elemen...

2.1 KiB
Raw Blame History

id title challengeType videoUrl localeTitle
bad87fee1348bd9aedf0887a Headline with the h2 Element 0 Título com o elemento h2

Description

Nas próximas lições, criaremos um aplicativo web de fotos para gatos em HTML5, peça por peça. O elemento h2 que você adicionará nesta etapa adicionará um cabeçalho de nível dois à página da web. Esse elemento informa ao navegador sobre a estrutura do seu site. h1 elementos h1 são freqüentemente usados para cabeçalhos principais, enquanto os elementos h2 são geralmente usados para subtítulos. Há também elementos h3 , h4 , h5 e h6 para indicar diferentes níveis de subtítulos.

Instructions

Adicione uma tag h2 que diga "CatPhotoApp" para criar um segundo element HTML abaixo do elemento h1 "Hello World".

Tests

tests:
  - text: Crie um elemento <code>h2</code> .
    testString: 'assert(($("h2").length > 0), "Create an <code>h2</code> element.");'
  - text: Certifique-se de que seu elemento <code>h2</code> tenha uma tag de fechamento.
    testString: 'assert(code.match(/<\/h2>/g) && code.match(/<\/h2>/g).length === code.match(/<h2>/g).length, "Make sure your <code>h2</code> element has a closing tag.");'
  - text: Seu elemento <code>h2</code> deve ter o texto &quot;CatPhotoApp&quot;.
    testString: 'assert.isTrue((/cat(\s)?photo(\s)?app/gi).test($("h2").text()), "Your <code>h2</code> element should have the text "CatPhotoApp".");'
  - text: Seu elemento <code>h1</code> deve ter o texto &quot;Hello World&quot;.
    testString: 'assert.isTrue((/hello(\s)+world/gi).test($("h1").text()), "Your <code>h1</code> element should have the text "Hello World".");'

Challenge Seed

<h1>Hello World</h1>

Solution

// solution required