Intro to HTML
Learning Goals
Demonstrate practical use of elements and attributes
Understand overall document structure
Apply text formatting, lists, links, and images
Core Concepts
HTML = Hyper Text Markup Language; standard for web pages
Describes page structure through elements (tags)
Other markup languages: KML, MathML, SGML, XML, XHTML
HTML vs XHTML (strict variant)
Document must start with
<!DOCTYPE>Root
<html>requiresxmlnsnamespace<html>,<head>,<title>,<body>are mandatoryTags, attribute names & values must be lowercase, properly nested, always closed, values quoted
Document Skeleton
<!DOCTYPE html>— tells browser which spec to use<html>— root element<head>— meta data,<title>, styles, scripts<body>— visible content
Elements & Attributes
Element = content wrapper (
<p>Text</p>)Attribute = extra info inside start tag (
<p class="intro">)Format:
<tag attr="value">
Text Formatting Tags
<b>,<strong>— bold / important<i>,<em>— italic / emphasized<mark>— highlight<small>— reduced size<del>,<ins>— deleted / inserted<sub>,<sup>— sub- & superscript
Lists
Unordered
<ul>→ bulletsOrdered
<ol>→ numbersDescription
<dl>with<dt>term &<dd>definition
Hyperlinks
Basic:
<a href="URL">text</a>targetvalues:_self(default),_blank,_parent,_topAbsolute URL = full address; relative URL = path within site
Image link: wrap
<img>inside<a>titleattribute shows tooltip
Images
Tag:
<img>(empty)src— file pathalt— alternative textOptional sizing via
width/heightorstyle
Supports animated GIFs
Can act as hyperlink when nested in
<a>
Graphics Options
HTML Canvas — pixel-based drawing (bitmap)
SVG — vector graphics (scalable)
Quick Reference Tags
Structural:
<!DOCTYPE>,<html>,<head>,<title>,<body>Content: headings
<h1>–<h6>, paragraph<p>Grouping:
<div>,<span>Media:
<img>,<video>,<audio>Lists:
<ul>,<ol>,<dl>Link:
<a>
Remember
Always close tags and nest properly
Quote attribute values
Provide meaningful
alttext for accessibilityUse relative links for internal navigation, absolute for external
Validate code against standards for cross-browser consistency