<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,
initial-scale=1.0">
<title>Título da Página</title>
</head>
<body>
<!-- Conteúdo aqui -->
</body>
</html>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Blog de Tecnologia</title>
</head>
<body>
<header>
<h1>Tech Blog</h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/artigos">Artigos</a></li>
<li><a href="/sobre">Sobre</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h2>Introdução ao HTML5</h2>
<p>Conteúdo do artigo...</p>
</article>
</main>
<aside>
<h3>Artigos Relacionados</h3>
<ul>
<li>CSS Moderno</li>
<li>JavaScript ES6+</li>
</ul>
</aside>
<footer>
<p>© 2024 Tech Blog</p>
</footer>
</body>
</html><p>Este é um parágrafo.</p><p>Isto é <strong>importante</strong>.</p><p>Isto é <em>enfatizado</em>.</p><p>Linha 1<br>Linha 2</p><p>
A fórmula da água é
H<sub>2</sub>O.
Einstein propôs
E=mc<sup>2</sup>.
</p>
<p>
Use <code>console.log()</code>
para debugar JavaScript.
</p>
<pre>
function exemplo() {
return true;
}
</pre><a href="/sobre">
Sobre Nós
</a><a href="https://google.com"
target="_blank"
rel="noopener">
Google
</a><a href="mailto:
[email protected]">
Enviar Email
</a><a href="#secao2">
Ir para Seção 2
</a>
<!-- Imagem básica -->
<img
src="caminho/foto.jpg"
alt="Descrição significativa da imagem"
width="800"
height="600"
>
<!-- Imagem responsiva com srcset -->
<img
src="imagem-800w.jpg"
srcset="
imagem-400w.jpg 400w,
imagem-800w.jpg 800w,
imagem-1200w.jpg 1200w
"
sizes="(max-width: 600px) 400px, 800px"
alt="Descrição da imagem"
>
<!-- Picture com múltiplos formatos -->
<picture>
<source srcset="imagem.avif" type="image/avif">
<source srcset="imagem.webp" type="image/webp">
<img src="imagem.jpg" alt="Descrição da imagem">
</picture><ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul><ol>
<li>Primeiro passo</li>
<li>Segundo passo</li>
<li>Terceiro passo</li>
</ol><dl>
<dt>HTML</dt>
<dd>Linguagem de marcação</dd>
<dt>CSS</dt>
<dd>Linguagem de estilo</dd>
</dl><form
action="/processar"
method="POST"
>
<label for="nome">Nome:</label>
<input
type="text"
id="nome"
name="nome"
required
>
<label for="email">Email:</label>
<input
type="email"
id="email"
name="email"
required
>
<label for="mensagem">
Mensagem:
</label>
<textarea
id="mensagem"
name="mensagem"
rows="4"
></textarea>
<button type="submit">
Enviar
</button>
</form><input type="tel" pattern="[0-9]{11}"><input type="url" placeholder="https://"><input type="range" min="0" max="100"><input type="file" accept="image/*"><input type="checkbox" name="termos"><input type="radio" name="plano"><label for="estado">Estado:</label>
<select id="estado" name="estado">
<option value="">
Selecione...
</option>
<option value="sp">
São Paulo
</option>
<option value="rj">
Rio de Janeiro
</option>
<option value="mg">
Minas Gerais
</option>
</select><label for="bio">Biografia:</label>
<textarea
id="bio"
name="bio"
rows="5"
cols="40"
maxlength="500"
placeholder="Conte sobre você..."
></textarea><input
type="text"
required
><input
type="password"
minlength="8"
maxlength="20"
><input
type="tel"
pattern="[0-9]{11}"
title="11 dígitos"
><input
type="number"
min="1"
max="100"
>
<form>
<fieldset>
<legend>Informações Pessoais</legend>
<label for="nome-completo">
Nome Completo *
</label>
<input
type="text"
id="nome-completo"
name="nome"
required
aria-describedby="nome-ajuda"
>
<small id="nome-ajuda">
Digite seu nome como aparece no documento
</small>
</fieldset>
<fieldset>
<legend>Selecione seu plano</legend>
<label>
<input type="radio" name="plano" value="basico">
Básico - R$ 29/mês
</label>
<label>
<input type="radio" name="plano" value="pro">
Pro - R$ 59/mês
</label>
</fieldset>
<button type="submit">Continuar</button>
</form><table>
<caption>Vendas Mensais por Região</caption>
<thead>
<tr>
<th scope="col">Região</th>
<th scope="col">Janeiro</th>
<th scope="col">Fevereiro</th>
<th scope="col">Março</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Norte</th>
<td>R$ 50.000</td>
<td>R$ 55.000</td>
<td>R$ 60.000</td>
</tr>
<tr>
<th scope="row">Sul</th>
<td>R$ 75.000</td>
<td>R$ 80.000</td>
<td>R$ 85.000</td>
</tr>
</tbody>
<tfoot>
<tr>
<th scope="row">Total</th>
<td>R$ 125.000</td>
<td>R$ 135.000</td>
<td>R$ 145.000</td>
</tr>
</tfoot>
</table>
<video controls width="640" height="360" poster="thumbnail.jpg">
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm">
<track
kind="subtitles"
src="legendas-pt.vtt"
srclang="pt"
label="Português"
>
Seu navegador não suporta vídeo HTML5.
</video><audio controls>
<source src="audio.mp3" type="audio/mpeg">
<source src="audio.ogg" type="audio/ogg">
Seu navegador não suporta áudio HTML5.
</audio><iframe
width="560"
height="315"
src="https://www.youtube.com/
embed/VIDEO_ID"
title="Título do vídeo"
frameborder="0"
allow="accelerometer; autoplay;
clipboard-write;
encrypted-media;
gyroscope;
picture-in-picture"
allowfullscreen
loading="lazy"
></iframe><iframe
src="https://www.google.com/maps/
embed?pb=..."
width="600"
height="450"
style="border:0;"
allowfullscreen=""
loading="lazy"
referrerpolicy="no-referrer-when-
downgrade"
></iframe>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Meu Site</title>
<link
rel="stylesheet"
href="styles.css"
>
</head>
<body>
<header class="site-header">
<h1 class="site-title">
Título
</h1>
<nav class="main-nav">
<a href="/">Home</a>
<a href="/sobre">Sobre</a>
</nav>
</header>
</body>
</html>/* Estilos globais */
body {
font-family: sans-serif;
margin: 0;
padding: 0;
}
/* Componentes */
.site-header {
background: #333;
color: white;
padding: 1rem;
}
.site-title {
margin: 0;
font-size: 2rem;
}
.main-nav a {
color: white;
margin-right: 1rem;
text-decoration: none;
}<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Contador</title>
</head>
<body>
<div class="counter">
<p>
Contagem:
<span id="count">0</span>
</p>
<button
id="increment-btn"
class="js-increment"
>
Incrementar
</button>
</div>
<script src="script.js">
</script>
</body>
</html>// Selecionar elementos
const countElement =
document.getElementById('count');
const incrementBtn =
document.querySelector(
'.js-increment'
);
// Estado
let count = 0;
// Adicionar comportamento
incrementBtn.addEventListener(
'click',
() => {
count++;
countElement.textContent = count;
}
);
console.log('App iniciado');<div class="card">
<h2>Título do Card</h2>
<p>Descrição do conteúdo aqui.</p>
<button onclick="handleClick()">
Clique Aqui
</button>
</div>
<style>
.card {
padding: 1rem;
border: 1px solid #ddd;
}
</style>
<script>
function handleClick() {
alert('Clicou!');
}
</script>function Card() {
const handleClick = () => {
alert('Clicou!');
};
return (
<div className="card">
<h2>Título do Card</h2>
<p>Descrição do conteúdo aqui.</p>
<button onClick={handleClick}>
Clique Aqui
</button>
</div>
);
}
// CSS em arquivo separado ou CSS-in-JS
// HTML estático repetido - ANTES
<article class="post">
<h2>Primeiro Post</h2>
<p>Conteúdo...</p>
<span>2024-01-15</span>
</article>
<article class="post">
<h2>Segundo Post</h2>
<p>Outro conteúdo...</p>
<span>2024-01-16</span>
</article>
// Componente React reutilizável - DEPOIS
function Post({ title, content, date }) {
return (
<article className="post">
<h2>{title}</h2>
<p>{content}</p>
<time dateTime={date}>
{new Date(date).toLocaleDateString('pt-BR')}
</time>
</article>
);
}
// Uso
function Blog() {
const posts = [
{ id: 1, title: 'Primeiro Post', content: 'Conteúdo...', date: '2024-01-15' },
{ id: 2, title: 'Segundo Post', content: 'Outro conteúdo...', date: '2024-01-16' }
];
return (
<main>
{posts.map(post => (
<Post key={post.id} {...post} />
))}
</main>
);
}<head>
<!-- Charset e Viewport -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO Básico -->
<title>Título da Página (50-60 caracteres)</title>
<meta name="description" content="Descrição concisa e atraente da página com 150-160 caracteres que aparece no Google.">
<meta name="keywords" content="html, web, desenvolvimento">
<link rel="canonical" href="https://seusite.com/pagina">
<!-- Open Graph (Facebook, LinkedIn) -->
<meta property="og:title" content="Título para Redes Sociais">
<meta property="og:description" content="Descrição para compartilhamento">
<meta property="og:image" content="https://seusite.com/imagem.jpg">
<meta property="og:url" content="https://seusite.com/pagina">
<meta property="og:type" content="website">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Título para Twitter">
<meta name="twitter:description" content="Descrição para Twitter">
<meta name="twitter:image" content="https://seusite.com/imagem.jpg">
<!-- Favicon -->
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
</head>
<img
src="imagem.jpg"
alt="Descrição"
loading="lazy"
width="800"
height="600"
><script src="analytics.js" async>
</script>
<script src="app.js" defer>
</script><link rel="preload"
href="font.woff2"
as="font">
<link rel="prefetch"
href="proxima-pagina.html">
<link rel="preconnect"
href="https://api.exemplo.com">