← HTML/CSS EnglishChapter 02 of 13

HTML Basics

## Learning Objectives - Master basic HTML elements - Understand attributes - Create headings, paragraphs, and text formatting - Work with links and images ## Basic Text Elements ### Headings HTML provides six heading levels from `

` to `

`: ```html

Main Heading (Page Title)

Section Heading

Subsection Heading

Sub-subsection Heading

Minor Heading
Smallest Heading
``` ### Paragraphs ```html

This is a paragraph of text. Browsers automatically add space before and after paragraphs.

Another paragraph with bold and italic text.

``` ### Line Breaks ```html

This is line one
This is line two

``` ## Text Formatting ### Bold and Strong ```html

Use bold for visual emphasis.

Use strong for semantic importance.

``` ### Italic and Emphasis ```html

Use italic for visual style.

Use emphasis for semantic stress.

``` ### Underline ```html

Use underline sparingly.

``` ### Strikethrough ```html

Old price: $100 $75

``` ### Superscript and Subscript ```html

The formula is H2O.

23 equals 8.

``` ## Links ### Basic Link ```html Visit Example ``` ### Link with Title ```html Example Site ``` ### Open in New Tab ```html New Tab ``` ### Internal Links ```html About Page Jump to Section ``` ## Images ### Basic Image ```html Description of photo ``` ### Image with Width and Height ```html Description ``` ### Image from URL ```html Remote image ``` ## Lists ### Unordered List ```html
  • First item
  • Second item
  • Third item
``` ### Ordered List ```html
  1. Step one
  2. Step two
  3. Step three
``` ### Definition List ```html
HTML
HyperText Markup Language - the standard markup language for web pages
CSS
Cascading Style Sheets - used for styling web pages
``` ## HTML Attributes Attributes provide additional information about elements: ```html Link Description ``` ### Common Attributes - `id` - unique identifier - `class` - CSS class name - `style` - inline CSS - `title` - tooltip text - `data-*` - custom data attributes ## Block vs Inline Elements ### Block Elements Start on a new line and take full width: ```html
,

,

-

,

Comments

Comments powered by Giscus

To enable comments, add your Giscus embed code here.

Learn more about Giscus →