Headings and Paragraphs
Yaser Rahmati | یاسر رحمتی
1. HTML Headings
Headings are used to define titles and subtitles on your web page. HTML provides six levels of headings, from <h1>
(largest) to <h6>
(smallest).
Explanation:
<h1>
is typically used for the main title or the most important heading.<h2>
to<h6>
are used for subheadings and less important titles, with each level decreasing in size and importance.
Example:
2. HTML Paragraphs
The <p>
tag is used to define a paragraph of text. Each block of text enclosed in <p>
tags is treated as a separate paragraph.
Syntax:
Explanation:
The
<p>
element will automatically add space before and after the paragraph to separate it from other content.Paragraphs are block-level elements, meaning they take up the full width of their container by default.
Example:
3. Combining Headings and Paragraphs
You can combine headings and paragraphs to structure your content clearly.
Example:
This example shows how headings and paragraphs work together to organize content logically.
Keywords
HTML
, Hypertext Markup Language
, Tags
, Elements
, Attributes
, Head
, Body
, Paragraph
, Heading
, Title
, Meta
, Link
, Image
, Anchor
, Hyperlink
, List
, Table
, Form
, Input
, Button
, CSS
, Class
, ID
, Inline
, Block
, Div
, Span
, Script
, Styles
, Font
, Color
, Background
, Margin
, Padding
, Border
, Doctype
, HTML5
, Video
, Audio
, Canvas
, SVG
External Links
🌐 Personal Website 📄 Resume 🎥 Video Archive 💼 Finance Blog 🔐 Network & Security Notebook 🎬 Aparat Channel
Last updated