HTML & CSS Course: Intro to HTML
Master HTML fundamentals and create your first webpage
This comprehensive introduction covers HTML basics, code editors, and building your first webpage from scratch using industry-standard tools and practices.
HTML Fundamentals
HyperText Markup Language
HTML is a tag-based markup language that labels and describes content structure. Think of it like price tags at a sale - they tell you what something is and how much it costs.
Plain Text Foundation
HTML files are simply plain text files with a .html extension. Any text editor can create HTML files, making web development accessible to everyone.
Browser Interpretation
Web browsers are HTML rendering programs that interpret your code and display the visual result. Users see the webpage, not the underlying code structure.
Popular Code Editors Comparison
| Feature | Feature | Sublime Text | Visual Studio Code | Atom |
|---|---|---|---|---|
| Cost | Paid (Free Trial) | Free | Free | |
| Developer | Sublime HQ | Microsoft | GitHub | |
| Platform Support | Mac & PC | Mac & PC | Mac & PC | |
| Trial Limitations | None | N/A | N/A |
Creating Your First HTML File
Open Code Editor
Launch your chosen code editor (Sublime Text, VS Code, or Atom) and create a new file
Save as HTML
Save the file with a .html extension (e.g., test.html) to designate it as a web page
Add HTML Structure
Create the basic HTML structure with opening and closing HTML tags using less than and greater than brackets
Add Head and Body
Insert head and body sections within the HTML tags - head contains metadata, body contains visible content
HTML uses opening and closing tags with the same name. Closing tags include a forward slash. Tags wrap around content to label and describe what that content represents.
HTML Document Structure
HTML Tag
The root container that wraps all content and declares the document as HTML. Everything else goes inside these tags.
Head Section
Contains metadata and information about the page that users typically don't see directly, like the title tag and other page properties.
Body Section
Contains all visible content that users see on the webpage. This is where text, images, links, and other content elements go.
Modern code editors provide auto-completion features. When you type a closing tag with a slash, the editor automatically completes the tag name for you, saving time and reducing errors.
Viewing Your Webpage
Save HTML File
Ensure your HTML file is saved with all changes before attempting to view in browser
Right-Click File
Navigate to your HTML file in the file system and right-click (or control-click on Mac)
Choose Browser
Select 'Open with' and choose your preferred browser like Chrome, Firefox, or Safari
Refresh for Changes
Use Command+R (Mac) or Ctrl+R (Windows) to refresh the page when you make code changes
The title tag appears in browser tabs, bookmarks, and search engine results. Include relevant keywords that users might search for, making it your webpage's advertisement on Google.
Where Title Tags Appear
Browser Tabs
The title shows in the tab bar at the top of the browser window, helping users identify different open pages.
Bookmarks
When users bookmark your page, the title becomes the bookmark name they'll see in their saved bookmarks list.
Search Results
Search engines like Google display your title tag as the clickable headline in search results, making it crucial for SEO.
Browsers ignore extra spaces, tabs, and line breaks in HTML. Multiple spaces are condensed to single spaces, and formatting must be controlled through HTML tags rather than whitespace.
Key Takeaways