HTML Introduction
HTML Introduction HTML stands for HyperText Markup Language. It is the standard language used to create and structure web pages. HTML helps browsers understand what to display on a webpage, such as text, images,...
HTML Introduction HTML stands for HyperText Markup Language. It is the standard language used to create and structure web pages. HTML helps browsers understand what to display on a webpage, such as text, images,...
HTML Editors HTML editors are tools used to write and edit HTML code easily. While you can use a basic text editor like Notepad (Windows) or TextEdit (Mac), specialized code editors make writing HTML...
Here are some simple HTML Basic Examples to understand how HTML works: 1. Display Heading
|
1 |
<h1>This is a Heading</h1> |
2. Display a Paragraph
|
1 |
<p>This is a paragraph of text in HTML.</p> |
3. Create a Link
|
1 |
<a href="https://www.google.com">Visit Google</a> |
4. Insert an Image
|
1 |
<img src="image.jpg" alt="Sample Image"> |
...
HTML Elements HTML elements are the building blocks of a webpage. An element usually consists of a start tag, content, and an end tag. Example of an HTML Element <p>Hello World!</p> <p> → Start...
HTML Attributes HTML attributes provide extra information about an HTML element. They are always written in the start tag and usually come in name=”value” format. Example
|
1 |
<a href="https://google.com">Visit Google</a> |
href is the attribute “https://google.com” is...
HTML Headings HTML provides six levels of headings to define titles and subtitles on a webpage. They range from <h1> (most important) to <h6> (least important). Example
|
1 2 3 4 5 6 |
<h1>This is Heading 1</h1> <h2>This is Heading 2</h2> <h3>This is Heading 3</h3> <h4>This is Heading 4</h4> <h5>This is Heading 5</h5> <h6>This is Heading 6</h6> |
Usage Notes <h1> is typically...
HTML Paragraphs HTML paragraphs are created using the <p> tag. A paragraph automatically adds space before and after the text. Example Code
|
1 2 3 4 5 6 7 |
<!DOCTYPE html> <html> <body> <p>This is the first paragraph.</p> <p>This is another paragraph with more text.</p> </body> </html> |
Output Preview This is how it will look in a...
HTML Styles HTML style attributes are used to change the appearance of elements. With the style attribute, you can add formatting such as colors, fonts, sizes, and more. Example Code
|
1 2 3 4 5 6 7 8 |
<!DOCTYPE html> <html> <body> <p style="color: blue;">This text is blue.</p> <p style="font-size: 20px;">This text is larger.</p> <p style="background-color: yellow;">This text has a yellow background.</p> </body> </html> |
Output Preview...
HTML Text Formatting HTML provides formatting tags to make text bold, italic, underlined, highlighted, and more. These tags help emphasize important content. Common Formatting Tags Tag Purpose <b> Bold text <strong> Important text (bold...
HTML Quotation and Citation Elements HTML provides special tags to display quotes, citations, and quoted text in a meaningful way. Common Quote-Related Tags Tag Purpose <q> Short inline quotation <blockquote> Long quotation (indented text)...