Welcome to Full Stack Developer Course || Complete HTML Free Course 2023
HTML Headings
There are six levels of headings in HTML, with h1 being the most important and h6 being the least. Here's an example of how you might use them:
- <h1>Main heading</h1>
- <h2>Secondary heading</h2>
- <h3>Tertiary heading</h3>
- <h4>Quaternary heading</h4>
- <h5>Quinary heading</h5>
- <h6>Senary heading</h6>
Headings are important for creating a hierarchy of information on a webpage and for helping users understand the structure of the content. They should be used to organize the content on the page and make it easy to scan.
It's generally a good idea to use only one h1 heading per page, as it indicates the main topic of the page. The other headings should be used to provide additional structure and to subdivide the content into logical sections.
You can also use the heading element to create headings of different sizes in Markdown:
HTML Paragraphs
In HTML, the p element is used to represent a paragraph of text. Here's an example of how you might use it:
- <p>This is the first paragraph.</p>
- <p>This is the second paragraph.</p>
You can also use the br element to insert a line break within a paragraph, like this:
- <p>This is the first line of the paragraph.<br>
- This is the second line of the paragraph.</p>
Note that the br element is an empty element, so it doesn't have a closing tag.
In Markdown, you can create paragraphs by leaving a blank line between blocks of text. For example:
This is the first paragraph.
This is the second paragraph.
HTML Style
There are several ways to add styles to HTML elements. One way is to use the style attribute on the element itself. For example:
CODE:
<p style="color: red;">This paragraph is red.</p>
OUTPUT:
This paragraph is red.
CODE:
<p style="color: yellow;">This paragraph is yellow.</p>
OUTPUT:
This paragraph is yellow.
1 Comments
Any Doubts ??
ReplyDelete