HTML Headings
⚛HTML headings are defined with the <h1> to <h6> tags.
⚛<h1> defines the most important heading.
⚛<h6> defines the least important heading:
⚛HTML headings are defined with the <h1> to <h6> tags.
⚛<h1> defines the most important heading.
⚛<h6> defines the least important heading:
❤1
<!DOCTYPE html>
<html>
<body>
<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>
</body>
</html>
...................................Result⬇️
<html>
<body>
<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>
</body>
</html>
...................................Result⬇️
❤2
⚛HTML Paragraphs
HTML paragraphs are defined with the <p> tag:⬇️
HTML paragraphs are defined with the <p> tag:⬇️
❤2
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
.......................................Result⬇️
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
.......................................Result⬇️
❤2👍1
This is a paragraph.
This is another paragraph.
This is another paragraph.
❤3
Media is too big
VIEW IN TELEGRAM
⚛Video<1>: HTML
⚛Subject: Basics of HTML Tags, Attributes, and Elements.
⚛Source: Udemy
⚛Quality: High
🕛Duration: 4:05
⚛Subject: Basics of HTML Tags, Attributes, and Elements.
⚛Source: Udemy
⚛Quality: High
🕛Duration: 4:05
👍5❤3
Nested HTML Elements
⚛HTML elements can be nested (this means that elements can contain other elements).
⚛All HTML documents consist of nested HTML elements.
⚛The following example contains four HTML elements (<html>, <body>, <h1> and <p>):⬇️
⚛HTML elements can be nested (this means that elements can contain other elements).
⚛All HTML documents consist of nested HTML elements.
⚛The following example contains four HTML elements (<html>, <body>, <h1> and <p>):⬇️
👍2
⚠️-Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!
👍2
⚠️-Never Skip the End Tag
Some HTML elements will display correctly, even if you forget the end tag.
Some HTML elements will display correctly, even if you forget the end tag.
⚛The <body> element defines the document's body.
⚛It has a start tag <body> and an end tag </body>.
Then, inside the <body> element there are two other elements: <h1> and <p>:
⚛It has a start tag <body> and an end tag </body>.
Then, inside the <body> element there are two other elements: <h1> and <p>:
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
..................................................⬇️
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
..................................................⬇️
👍1
Example Explained
⚛The <html> element is the root element and it defines the whole HTML document.
⚛It has a start tag <html> and an end tag </html>.
⚛Then, inside the <html> element there is a <body> element:
⚛The <html> element is the root element and it defines the whole HTML document.
⚛It has a start tag <html> and an end tag </html>.
⚛Then, inside the <html> element there is a <body> element:
👍2
⚠️-However, never rely on this! Unexpected results and errors may occur if you forget the end tag!
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
..................................................⬇️
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
..................................................⬇️
👍3