What is an HTML Element?
- An HTML element is a complete set that consists of a start tag (or opening tag), content, and an end tag (or closing tag).
HTML Element = Start Tag + Content + End Tag
<h1>
is the start tag, "This is our first heading" is the content, and</h1>
is the end tag. Together, they form an HTML element.
What is a Nested HTML Element?
- A nested HTML element is an HTML structure where one element is placed inside another element.
Nested HTML Element = One HTML Element Inside Another HTML Element
- the
<b>
element (child) is nested inside the<h1>
element (parent).
HTML Elements List
An HTML element includes an opening tag, content, and a closing tag, forming a complete set.
Element Name | HTML Code | Description |
---|---|---|
Paragraph | <p> | Used to create a paragraph. |
Heading | <h1> to <h6> | Used to create a heading. |
Button | <button> | Used to create a button. |
List | <ul> and <ol> | Used to create a lists. |
List Item | <li> | Used to create a list item. |
Link | <a> | Used to create a link. |
Table | <table> | Used to create a table. |
Table Row | <tr> | Used to create a table row. |
Table Cell | <td> and <th> | Used to create a table cell. |
Form | <form> | Used to create a form. |
Input | <input> | Used to create an input. |
Textarea | <textarea> | Used to create a textarea. |
Select | <select> | Used to create a select. |
Option | <option> | Used to create an option. |
Label | <label> | Used to create a label. |
Span | <span> | Used to create a span. |
Div | <div> | Used to create a div. |
HTML self-closing tags
Element Name | HTML Code | Description |
---|---|---|
Image | <img> | Used to create an image. |
Break | <br> | Used to create a break. |
Horizontal Rule | <hr> | Used to create a horizontal rule. |
Video | <video> | Used to create a video. |
Audio | <audio> | Used to create an audio. |
Source | <source> | Used to create a source. |
Embed | <embed> | Used to create an embed. |
Object | <object> | Used to create an object. |
Param | <param> | Used to create a param. |
Map | <map> | Used to create a map. |
Area | <area> | Used to create an area. |
HTML Elements vs Tags
Tag | Element |
---|---|
Tags are used to mark the start and end of an element. | Elements are the collection of a start tag, its attributes, an end tag and everything in between. |
Tags are written in angle brackets (<tag> ). | Elements include the start tag, end tag, attribute, and content. |
0 Comments:
Post a Comment
Do leave your comments