Estrutura básica de um Documento HTML

Bóson Treinamentos
12 Dec 201709:40

Summary

TLDRIn this video, Fabio Dalonso teaches the basic structure of an HTML document. He demonstrates creating a simple HTML document and explains the importance of elements such as the 'doctype', 'html', 'head', and 'body'. He emphasizes the use of the 'lang' attribute to define the page's language and discusses the 'meta' tag for character set declaration. The video also covers the concept of nesting elements and the difference between header and body sections, highlighting the placement of the title and content. Fabio encourages viewers to learn this foundational structure to build more complex HTML pages.

Takeaways

  • 😀 The video is a tutorial by Fábio Dalonso focusing on the basic structure of an HTML document.
  • 📄 HTML documents are composed of elements, and the video demonstrates creating a simple HTML document.
  • 🗂️ The 'doctype' declaration is crucial as it defines the type of HTML used, in this case, HTML5.
  • 🌐 The 'html' element represents the entire page and all content to be displayed is placed within this element.
  • 🏷️ The 'lang' attribute within the 'html' element specifies the language of the page, which is important for accessibility and SEO.
  • 📝 The 'head' section of an HTML document contains meta-information like the title, meta tags, and links to stylesheets and scripts.
  • 🔍 The 'title' element within the 'head' defines the title of the webpage, which appears in the browser's title bar.
  • 📑 The 'meta' element with a 'charset' attribute specifies the character encoding for the webpage, commonly UTF-8.
  • 📝 The 'body' tag encloses the content of the HTML document that is visible to users in the browser.
  • 📖 The video concludes with a demonstration of how the created HTML document appears in a browser, highlighting the basic structure's importance.

Q & A

  • What is the purpose of the 'DOCTYPE' declaration in an HTML document?

    -The 'DOCTYPE' declaration is used to inform the web browser about the version of HTML being used. In the script, it is mentioned that 'DOCTYPE html' specifies that the document is using HTML5.

  • What is the first element in an HTML document structure?

    -The first element in an HTML document structure is the 'html' element, which represents the entire page and contains all other elements including the head and body sections.

  • What is the significance of the 'lang' attribute in the 'html' element?

    -The 'lang' attribute in the 'html' element is important because it specifies the language of the page's content. In the script, 'lang="pt-br"' is used to indicate that the page is in Portuguese (Brazilian).

  • What are the two main sections of an HTML document?

    -The two main sections of an HTML document are the 'head' section, which contains meta-information about the document, and the 'body' section, which contains the content of the document that is visible to users.

  • What is the role of the 'head' element in an HTML document?

    -The 'head' element in an HTML document contains meta-information about the document, such as its title, scripts, styles, and other metadata. It does not directly display content on the web page.

  • How is the title of an HTML page defined?

    -The title of an HTML page is defined using the 'title' element within the 'head' section. It sets the text that appears in the browser's title bar or page tab.

  • What is the purpose of the 'meta' element with 'charset' attribute?

    -The 'meta' element with a 'charset' attribute specifies the character encoding for the HTML document. In the script, 'charset=utf-8' is used, which is a common encoding that includes most characters from all known human languages.

  • What does the 'body' element of an HTML document represent?

    -The 'body' element represents the content of an HTML document that is visible to users, such as text, images, links, and other content that appears on the web page.

  • What is the significance of the 'p' element mentioned in the script?

    -The 'p' element represents a paragraph in an HTML document. In the script, it is used to create a paragraph that contains visible text content on the web page.

  • How does the script describe the process of creating an HTML document?

    -The script describes the process of creating an HTML document by starting with the 'DOCTYPE' declaration, followed by the 'html' element, then adding 'head' and 'body' sections. The 'head' section includes the title and possibly other metadata, while the 'body' section contains the actual content to be displayed.

  • What is meant by 'aninhamento' in the context of HTML elements?

    -In the context of HTML elements, 'aninhamento' (nesting) refers to placing one HTML element inside another. The script mentions that not all elements can be nested, and some elements do not make sense to be inside others.

Outlines

00:00

🌐 Introduction to HTML Document Structure

Fábio Dalonso introduces the basic structure of an HTML document in this video. He begins by creating a simple HTML document and explaining the structure, emphasizing that HTML documents are composed of elements. He starts with the doctype declaration, which is crucial for defining the type of HTML used (HTML5 in this case) and informing the browser how to render the page. The video then moves on to discuss the 'html' element, which represents the entire page and can contain attributes like 'lang' to specify the language of the page. Fábio also touches on the division of an HTML document into the 'head' and 'body' sections, where the 'head' contains meta-information like the title and 'body' contains the visible page content. He concludes by discussing the nesting of elements within HTML and the importance of understanding this structure for further learning.

05:09

📝 Deep Dive into HTML Elements and Attributes

In the second paragraph, Fábio Dalonso continues to explore the intricacies of HTML elements and attributes. He explains that not all elements can be nested within others, and there are specific rules governing this. He then delves into the 'head' section, highlighting the use of the 'meta' element, particularly the 'charset' attribute, which defines the character set used by the page (UTF-8 is standard). Fábio also mentions that some elements, like 'meta', do not require a closing tag and serve to provide metadata about the document. The paragraph concludes with a discussion on the 'body' element, which contains the actual content of the web page displayed to the user. Fábio demonstrates creating a simple paragraph within the 'body' and shows how it appears in the browser, reinforcing the concept of the HTML document structure and its components.

Mindmap

Keywords

💡HTML

HTML stands for HyperText Markup Language, which is the standard markup language for creating web pages and web applications. It is the fundamental building block of the internet, used to structure content on the web. In the video, HTML is the main theme as the script discusses the basic structure of an HTML document, which includes elements, tags, and attributes.

💡DOCTYPE

The DOCTYPE is a declaration in HTML that defines the document type and version of HTML. It is important because it tells the browser about the version of HTML being used, which helps the browser to render the page correctly. In the script, the DOCTYPE is mentioned as the first element in an HTML document, specifying HTML5.

💡Element

In the context of HTML, an element is a component of an HTML document, consisting of a start tag, content, and an end tag. Elements can also have attributes that provide additional information about the element. The script explains how elements are used to construct an HTML document, with examples such as the 'html' element representing the entire document.

💡Tag

A tag in HTML is a keyword surrounded by angle brackets that tells the web browser how to interpret the information between the tags. Tags are used to define elements in an HTML document. The script discusses the use of opening and closing tags, such as 'html' and 'head', to structure the HTML document.

💡Attribute

An attribute in HTML is a modifier that provides additional information about an element. It is used within the start tag of an element and helps to define the properties of that element. The script mentions the 'lang' attribute within the 'html' element, which specifies the language of the page, in this case, 'pt-br' for Portuguese (Brazil).

💡Head

The 'head' element in HTML contains meta-information about the document, such as its title and links to scripts and style sheets. It is a container for metadata, which means data about data. In the script, the 'head' element is described as containing elements like 'title' and 'meta', which are crucial for defining the document's properties.

💡Title

The 'title' element in HTML defines the title of the document, which is shown in the browser's title bar or in the page's tab. It is an important element within the 'head' section as it provides a title for the webpage. The script mentions how the 'title' element is used to set the title of the HTML document.

💡Meta

The 'meta' element in HTML represents metadata that cannot be represented by other HTML meta-related elements, like 'base', 'link', 'script', 'style', or 'title'. It is used within the 'head' element to provide metadata about the HTML document. The script refers to the 'meta' element's 'charset' attribute, which specifies the character encoding for the document.

💡Body

The 'body' element in HTML contains the contents of the HTML document, such as text, images, links, and other elements that will be visible to users visiting the webpage. It is the main section where the visible content of the document is placed. The script explains that the 'body' tag encloses the content that will be displayed on the web page.

💡Paragraph

A 'p' element, or paragraph, in HTML is used to define a paragraph of text. It is one of the fundamental block elements that define the structure of the content on a webpage. In the script, a paragraph is created using the 'p' tag to demonstrate how content is added to the 'body' of the HTML document.

Highlights

Introduction to the basic structure of an HTML document

Creating a simple HTML document

Explanation of HTML document composition by elements

Insertion of the Doctype element to define the HTML version

The importance of Doctype for browser rendering

Introduction of the HTML element as the container for the document

Explanation of the lang attribute for specifying the document's language

Division of the HTML document into the head and body sections

Purpose of the head section for metadata and declarations

Role of the body section for holding the page's content

Creation of the head section with the head tag

Inclusion of the title element within the head section

Explanation of element nesting in HTML

Introduction of the meta element and its charset attribute

Discussion on the use of UTF-8 character encoding

Creation of the body section with the body tag

Insertion of content within the body section

Demonstration of the HTML document in a browser

Explanation of how the title appears in the browser's title bar

Encouragement to learn the basic structure for future HTML page creation

Invitation to subscribe to the channel and visit the website for more training

Transcripts

play00:00

olá pessoal aqui o fábio dalonso

play00:03

treinamentos neste vídeo vamos falar

play00:05

sobre estrutura básica de um documento

play00:07

html

play00:08

então nesse vídeo a gente vai criar um

play00:10

pequeno documento html bem simples e vou

play00:13

aproveitar para explicar como é que a

play00:15

estrutura de um documento html

play00:18

como você já sabe os documentos html são

play00:21

compostos por elementos

play00:23

então pra construir o documento html ou

play00:25

inserir alguns elementos aqui no meu

play00:27

colo vou começar a pagar nessa frase

play00:30

aqui a gente vai trabalhar com exceção

play00:35

de alguns elementos

play00:37

primeiramente eu vou inserir doc type

play00:44

htm é necessariamente um elemento que

play00:49

vai dentro da página em si mas ele é

play00:52

importante essa tag nessa marcação

play00:54

importante porque ela vai perder vai

play00:56

definir qual é o tipo de html que a

play00:59

gente está usando no caso

play01:01

o doc type html simplesmente que o html

play01:04

significa html5 a isso é importante

play01:07

porque em forma para o navegador qual é

play01:09

o tipo ht ml que ele deve indenizar

play01:12

então a gente começa sempre com a

play01:15

reclamação do time html abre e fecha

play01:18

essa tá lisinho certo

play01:21

depois a gente vem com o nosso primeiro

play01:23

elemento é o elemento html

play01:27

olha que interessante veja aqui o edital

play01:29

ele reconhece esse cara tá marca aqui na

play01:32

cor azul e até mostra aquino - e então

play01:36

feche esse cara ele tem uma tag de

play01:39

abertura de fechamento e como todo

play01:41

elemento html

play01:43

ele pode ter um conteúdo que no caso não

play01:46

é um elemento vazio do ele tem um

play01:48

conteúdo desde o cursor ficou parado

play01:50

aqui no meio e aí a gente vai na entrar

play01:52

aqui para poder inserir o conteúdo

play01:55

esse elemento ou html o elemento

play01:57

representa a página toda é o documento

play02:00

todo então todo o conteúdo que vai ser

play02:03

exibido aqui na sua página ele vai estar

play02:04

entre essas duas téchiné até de abertura

play02:08

e de fechamento

play02:09

html certo como eu falei em outro vídeo

play02:13

é um dos elementos que eles podem ter

play02:15

atributos o elemento html tem atributos

play02:19

também em um atributo importante que ele

play02:21

tem que é legal a gente colocar sempre

play02:23

eu

play02:24

lang lang ea gente vai usar a seguinte

play02:28

atributo pt br

play02:34

o tributo lang ele vai determinar qual é

play02:37

o idioma está sendo usado na página vai

play02:38

formar com o navegador que a página tem

play02:41

no caso português do brasil é bastante

play02:44

importante a um atributo lang pt-br

play02:49

último jogo vencemos um pouquinho que é

play02:52

bom a gente tem a marcação das tags html

play02:56

abrindo e fechando isso aqui simboliza

play02:58

toda a minha página essa página que

play03:01

embora o documento html no geral ele é

play03:05

dividido em duas sessões

play03:07

ele tem uma seção que a gente uma

play03:09

exceção de cabeçalho e ele tem uma seção

play03:15

que é o corpo do documento na cabeça a

play03:21

gente coloca algumas declarações

play03:23

importantes como por exemplo o título

play03:24

que vai da barra de título do navegador

play03:28

tags meta em outras importantes no corpo

play03:34

o conteúdo da página e se a cabeça você

play03:38

pode também colocar códigos links pra

play03:40

folhas de estilo cse se o código

play03:42

javascript e assim por diante

play03:45

apesar da para inserir de certa forma

play03:47

também os tiros no corpo e javascript no

play03:50

corpo do cabeçalho local mais indicado

play03:52

para isso e como é que a gente faz para

play03:55

criar o cabeçalho o corpo da minha

play03:57

página

play03:58

vamos fazer assim o primeiro cabeçalho

play04:00

cabeçalho ele é criado com uma tag head

play04:05

to head

play04:08

aqui é de cabeçalho essa tag tem essa

play04:13

esse elemento tem até de abertura

play04:15

fechamento e aqui no mês que vai colocar

play04:17

mais alguns itens aqui dentro eu posso

play04:21

colocar outros elementos por exemplo que

play04:24

existe um elemento chamado taiti ou

play04:26

título e esse elemento ele representa o

play04:30

título da página

play04:32

então aqui vai o título da bm é que

play04:40

aparece aqui em cima

play04:42

na barrinha de títulos do navegador a

play04:45

ficar interessante anotando agora que

play04:49

esse elemento

play04:51

ele está dentro desse elemento dentro do

play04:54

head to head está dentro do html

play04:58

esse é um processo que a gente chama de

play04:59

aninhamento minha' momento quando você

play05:08

tem uma tag dentro de outro a tag ou

play05:11

seja um elemento dentro de outro

play05:12

elemento é possível fazer isso com

play05:15

alguns dedos elementos em html nem todo

play05:17

elemento pode ser alinhado tá

play05:19

existem casos em que você não consegue

play05:21

colocar um elemento dentro do outro não

play05:22

faz nem sentido às vezes ao longo do

play05:25

curso você vai perceber com mais clareza

play05:28

bom outra coisa importante que a gente

play05:31

pode colocar aqui dentro do cabeçalho é

play05:34

uma tag o elemento meta os elementos mas

play05:40

eles têm vários atributos mais um

play05:42

atributo que é importante é esse cara

play05:44

aqui ó charset que esse cara que vai

play05:48

representar conjunto de caracteres que a

play05:51

página vai utilizar o tipo de conjunto

play05:54

de caracteres geralmente é o tf 8

play06:00

veja o caso do meta não precisa ter até

play06:03

de fechamento aqui então essa daqui é

play06:07

uma tag que não têm o conteúdo como a os

play06:11

elementos tradicionais elementos normais

play06:13

estão elementos em conteúdo é só a tag

play06:15

em si mas ela tem atributos vários

play06:17

profissionais aqui um deles apenas

play06:19

aprendi que a página vai utilizar a

play06:21

codificação o

play06:22

f8 é mais comum a gente não se preocupe

play06:26

se você entender muito bem o que

play06:27

significa charset utf-8 utiliza hollande

play06:32

porque a gente vai depois destrinchar

play06:34

nos próximos vídeos nas teses uma uma

play06:36

para entender melhor inclusive os

play06:38

atributos que elas possuem como utilizar

play06:40

as diferenças etc

play06:42

vamos nos focar apenas na estrutura da

play06:44

página para montar uma página e ver

play06:46

aquela cena exibida aqui no navegador

play06:48

bom então coloquei esses dois caras

play06:51

dentro do cabeçalho e agora precisa do

play06:52

corpo da página

play06:54

o corpo da página a gente queria com uma

play06:57

tag chamada bari fecha o bairro tem um

play07:01

elemento bairro que é um elemento do

play07:03

corpo da minha página

play07:05

então dentro desse elemento aqui a gente

play07:08

vai colocar todo o conteúdo da página

play07:12

vou colocar uma frase aqui só pra gente

play07:15

visualizada funciona ou criar um

play07:17

parágrafo

play07:19

você deve se lembrar do elemento pq a

play07:21

gente viu outro vídeo de barro

play07:24

então eu vou escrever assim este aqui é

play07:27

o conteúdo da html certo então é um

play07:36

parágrafo que deve aparecer aqui nada

play07:39

meu navegador

play07:41

deixa só da magia que no código salvar

play07:52

ok e agora vou carregar ele aqui no

play07:54

navegador para a gente ver o que aparece

play07:55

aí esse aqui é o conteúdo da página html

play08:00

que maravilha esse elemento aqui

play08:03

esse parágrafo com esse conteúdo está

play08:05

aparecendo aqui na minha página do todo

play08:08

o resto eu coloquei aqui em cima da

play08:10

cabeça inclusive não aparece aqui na

play08:12

página que é só o corpo dela na

play08:14

estrutura do documento html o corpo é

play08:17

onde você insere o conteúdo que vai ser

play08:19

exibido aqui na página e veja quem se o

play08:23

título ainda pra enxergar aqui o título

play08:26

este documento aqui no navegador está

play08:29

escrito aqui vai o título da página htt

play08:31

não come tudo porque ficou muito grande

play08:33

mas é exatamente o título que eu

play08:35

coloquei aqui

play08:36

posso até mudar ao escrever assim aqui

play08:39

vai o título e deixar só assim aqui vai

play08:42

o título salvar recarregar a aqui vai o

play08:48

título

play08:49

essa estrutura base conan de uma página

play08:52

html

play08:53

os nossos próximos vídeos e ao longo do

play08:55

curso a gente vai trabalhar com uma

play08:56

estrutura desse tipo que a gente vai

play08:58

construindo em cima dela e eu vou

play09:00

mostrar como funciona os diversos

play09:01

elementos html que bom aqui no corpo e

play09:04

também os que vão aqui no cabeçalho

play09:07

incluindo aí é elementos para inclusão

play09:10

de css elementos para a inclusão de

play09:12

scripts e outros elementos aí de

play09:15

configuração da página

play09:17

então isso aí aprenda essa estrutura

play09:21

aqui porque é muito importante ea partir

play09:23

dela que a gente vai criar as nossas

play09:24

páginas html

play09:26

só espero que tenham gostado aproveite

play09:29

para se inscrever aqui no canal da voz

play09:30

em treinamentos e também para visitar o

play09:32

nosso website que é o www.goojje.com

play09:35

treinamentos ponto com.br

play09:37

obrigado e até a próxima

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
HTML BasicsWeb DevelopmentDocument StructureWeb DesignCoding TutorialHTML5Web StandardsProgrammingOnline LearningTech Education
هل تحتاج إلى تلخيص باللغة الإنجليزية؟