- HTML is used to structure a webpage and its content.
- In the web stack:
- HTML = structure/layout
- CSS = style
- JavaScript = logic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
- HTML tags wrap content.
- Attributes provide extra information to a tag.
- Attributes usually go in the opening tag.
- You can inspect or view source in the browser to study HTML.
- In VS Code,
Ctrl + / comments out code.
- Type
! and use Emmet to generate a starter HTML skeleton.
- The Live Server extension is useful for previewing changes quickly.
<p>This is my paragraph content</p>
h1 is the most important heading.
h6 is the least important heading.
<h1>Most Important Heading</h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6>Least Important Heading</h6>
- Anchor tags create links using
href.
<a href="https://google.com">Google</a>