Vamos começar com algo simples. Que tal uma página que diga: “Esta é a minha primeira página web.” Continue e você verá como isto é simples de fazer.
HTML é simples e lógico. O navegador lê HTML de modo idêntico ao que você lê um texto qualquer, de cima para baixo e da esquerda para a direita. Assim um documento HTML inicia com aquilo que deve ser a primeira coisa aparecer na página e termina com a última coisa a aparecer.
A primeira coisa a fazer é dizer ao navegador que você vai “falar” com ele na linguagem HTML. Isto é feito com a tag <html>
(nenhuma novidade nisto). Então, antes de mais nada digite “<html>
” na primeira linha do documento, no Notepad.
Como sabemos das lições anteriores, <html>
é uma tag de abertura e deve ser fechada com a tag de fechamento quando você acabar de digitar seu documento HTML. Para termos certeza que não iremos esquecer de fechar a tag HTML, faça isso agora mesmo, digitando “</html>
” localizada a algumas linhas abaixo, assim você irá escrever seu documento entre as tags digitadas <html>
e </html>
.
A próxima coisa que o documento precisa é um “head” (cabeça), que fornece informações sobre o documento e um “body” (corpo), que abriga o conteúdo do documento. Como HTML não seria nada se não fosse lógico, a “cabeça” (<head>
e </head>
) fica em cima do “corpo” (<body>
e </body>
).
Seu documento agora está como mostrado abaixo:
<html>
<head>
</head>
<body>
</body>
</html>
Notar como estruturamos o código em linhas diferentes (usar a tecla Enter para pular para próxima linha) e também a indentação (recuos) do código (usar a tecla Tab). A príncipio não faz qualquer diferença a maneira como você estrutura (linhas e recuos na digitação) seu documentoHTML. Mas um código bem estruturado é mais fácil de ler e entender, é altamente recomendado que você adote uma estrutura clara e nítida para seu HTML, usando linhas e indentação (recuos), como mostrado no exemplo acima.
Se o seu documento está como o mostrado acima, você construiu sua primeira página web – uma página particularmente chata e provalvelmente nada parecido com o que você sonhou fazer quando começou a ler este tutorial, mas de qualquer forma um tipo de website. Isto que você fez será um template base para seus futuros documentos HTML.
Como colocar conteúdo nesta página?
Um documento HTML é composto de duas partes: um head e um body. Na seção head você escreve informações sobre a página e na seção body você coloca as informações que constituem a página.
Por exemplo, para dar um título ao documento, título este que apareça no topo da barra do navegador você deverá usar a seção”head”. A tag para acresentar um título é <title>
:
<title>Minha primeira página web</title>
Notar que o título não aparece na página propriamente dita. Tudo que você quer que apareça na página é conteúdo e deverá ser colocado entre as tags “body”.
Conforme combinamos, queremos uma página dizendo, “Hurrah! Esta é a minha primeira página web.” Este é o texto que queremos comunicar e ele deverá ser colocado na seção body. Então digite na seção body o seguinte:
<p>Hurrah! Esta é a minha primeira página web.</p>
A letra p na tag <p>
é a abreviatura para “paragraph” (parágrafo) que é exatamente o que o texto é – um texto parágrafo.
Seu documento HTML agora está como mostrado a seguir:
<html>
<head>
<title>Minha primeira página web</title>
</head>
<body>
<p>Esta é a minha primeira página web.</p>
</body>
</html>
Pronto! Você acaba de construir seu primeiro website!
Agora basta que você salve seu trabalho no HD e depois visualize no navegador:
- No Notepad vá ao menu “Arquivo” no topo da janela e escolha a opção “Salvar como…”.
- Escolha “Todos os arquivos” no box “Salvar como tipo”. Isto é muito importante – caso você não faça isto, o arquivo será salvo como texto e não como documento HTML.
- Salve seu documento com o nome “page1.htm” (a extensão “.htm” indica que se trata de um documento HTML. A extensão “.html” dá o mesmo resultado. Eu sempre uso “.htm”, mas você pode escolher a que você preferir .htm ou .html). Você pode salvar o documento onde você quiser no seu HD – esteja certo de salvar em um lugar que depois você possa achar com facilidade.
Agora vá ao seu navegador:
- No menu existente no topo do navegador vá em “Arquivo” e escolha a opção “Abrir” (CTRL+O).
- Clique em “Procurar” no box que aparece.
- Localize o seu documento HTML e clique em “Abrir”.
Você deverá ver no seu navegador: “Esta é a minha primeira página web.” Parabéns!
747 online casino- World’s Top Online Casinos, new user welfare register bonus 66₱, daily Betting Rebate 2. fast withdraw, good bonus, variety of games, World brand is trustworthy. Slot games, Card games , Live Casino, Animals(Cockfight games), fishing.
Howdy I am so happy I found your blog, I really found you by mistake, while I was looking on Digg for something else, Anyhow I am here now and would just like to say many thanks for a incredible post and a all round entertaining blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the superb work.
I’ll immediately grab your rss as I can not find your e-mail subscription link or e-newsletter service. Do you’ve any? Please let me know in order that I could subscribe. Thanks.
Hey there just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.
Aw, this was a very nice post. In idea I want to put in writing like this additionally – taking time and precise effort to make an excellent article… but what can I say… I procrastinate alot and not at all appear to get something done.
Admiring the dedication you put into your blog and in depth information you provide. It’s good to come across a blog every once in a while that isn’t the same outdated rehashed information. Excellent read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
I have been examinating out many of your posts and i can claim pretty nice stuff. I will make sure to bookmark your blog.
Hey there! I’ve been following your weblog for some time now and finally got the bravery to go ahead and give you a shout out from Dallas Texas! Just wanted to mention keep up the good work!
Fantastic website. Lots of useful info here. I’m sending it to several friends ans also sharing in delicious. And naturally, thanks for your effort!
It’s appropriate time to make some plans for the longer term and it is time to be happy. I’ve learn this submit and if I could I wish to counsel you some attention-grabbing issues or tips. Maybe you can write subsequent articles referring to this article. I desire to learn more things approximately it!
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik
I cherished as much as you’ll obtain carried out right here. The cartoon is tasteful, your authored material stylish. nevertheless, you command get bought an impatience over that you wish be turning in the following. unwell surely come further formerly again as exactly the same nearly a lot ceaselessly inside case you shield this hike.
Great beat ! I wish to apprentice even as you amend your web site, how can i subscribe for a weblog website? The account helped me a acceptable deal. I have been tiny bit familiar of this your broadcast offered brilliant transparent concept
Thanks for one’s marvelous posting! I really enjoyed reading it, you may be a great author.I will make certain to bookmark your blog and will eventually come back later on. I want to encourage you to ultimately continue your great work, have a nice afternoon!
I have been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did, the web will be much more useful than ever before.
We absolutely love your blog and find nearly all of your post’s to be just what I’m looking for. Does one offer guest writers to write content for you personally? I wouldn’t mind writing a post or elaborating on most of the subjects you write related to here. Again, awesome website!
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik
Wow, marvelous blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is magnificent, let alone the content!