Html Elements
Html Elements: Are written within start and end tag. Content is written between the tags. Tags are always in pair of start and end.
Syntax for Html Elements
<start_tag>content</end_tag>
Example :
<p>Hiiiii(content)</p>
Html Elements Example
Example
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body> <h1> Main Heading</h1> <p>Paragraph.</p> <br><br> <h2>Heading 2</h2> </body> </html> |
Output :
Tags Description
[table width=”100%” colwidth=”10|100|290|160″ colalign=”left|left|left|left|left”]
No,Start Tag,End Tag,Description
1, <html>, </html>, Defines the html document
2, <title>, </title>, Defines the title of the page.
3, <head>, </head>, Defines the information about the page
4, <body>, </body>, Contains the visible part of page.
5,<h1>,</h1>, Defines the heading in the page.
6, <p>,</p>, Defines the paragraph.
[/table]
Note : Always Close the tags
Example :
<p> My Paragraph</p>
Tags are not case sensitive
But we prefer to use lowercase.
Advertisements
Add Comment
📖 Read More
- 1. Html Attributes
- 2. Html Headings
- 3. Html Paragraphs
- 4. Html Styles
- 5. Html Formatting
- 6. Html bold tag
- 7. Html strong tag
- 8. Html Italic Tag
- 9. Html mark tag
- 10. Html small tag