Topic 1 ยท HTML Fundamentals โ 3 hours ยท Recap, page structure, lists, and images
We started by reviewing the tags from Class 1 โ <h1>, <h2>, <h3>, and <a>. Then we added a handful of text-formatting tags that handle small but essential jobs.
Every HTML page follows the same skeleton. Once you know the structure, every site you build starts the same way.
<!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>
<!DOCTYPE html> โ tells the browser this is an HTML5 document so it renders correctly.<html lang="en"> โ the root element. lang="en" tells browsers and search engines the document is in English (helps with accessibility and SEO).<head> โ invisible meta-information about the page: character encoding, viewport, title, stylesheets, scripts.<meta charset="UTF-8"> โ supports a wide range of characters and symbols from any language.<meta name="viewport"> โ makes the page responsive on mobile devices.<title> โ the text in the browser tab and search results.<body> โ everything visible to the user lives in here.<header> โ top-of-page content, usually where the nav bar goes. Not the same as <head>.<footer> โ bottom-of-page content. Can include text, links, images.<strong>, and other text-adjusting tags. Use your reference sheet. Screen-share and show the class when you're done.
Two ways to list things:
<ol> โ ordered list (numbered)<ul> โ unordered list (bulleted)<li> โ list item (used inside both)<ul>
<li>First item</li>
<li>Second item</li>
</ul>
To put an image on a page, use the <img> tag. It's self-closing โ no </img>.
<img src="path/to/your/image.jpg" alt="Description of the image">
images folder).images folder inside your project. Keep all your images in there. Never reference an image that lives on someone else's computer or random web URL โ copy it into your project first.
If an image doesn't fit, use the style attribute for quick adjustments:
<img src="images/hero.jpg" alt="Hero photo" style="width: 400px;">
To set a background image on the whole page, use a style attribute on the <body> tag (we'll move this into CSS files later):
<body style="background-image: url('images/background.jpg'); background-size: cover;">
<br>, <strong>, <em>, <hr>, <u> for small text adjustments<!DOCTYPE html> and the <html>/<head>/<body> structure<head> and <header><ul>/<ol> with <li> for lists<img src alt> and always include alt textimages/ folder in your projectClass 2 โ Equinim College ยท Front End Web Development ยท 26B