HTML ELEMENTS
- In the first lesson we have studied about tags and things like start tag ( opening tag) and end tag (closing tags).
HTML TAGS
HTML tags are elements names surrounded by an angle brackets.
In HTML we use start and end tags.
START TAG AND END TAG
- Start tag - also called opening tag. example : <p>
- end tag - also called closing tag. example : </p>
and an "end tag".
example: <P> this is an element content </p>
- <p>: start tag
- this is an element content : element content
- </p>: end tag
NESTED HTML
There are some cases that an HTML element can contain one are more HTML elements.
for you to better understand it look at the example code below:
<p><i>italicized text</i></p>
output:
italicized text
NOTE:TRY THIS IN NOTEPAD OR IN ONLINE COMPLIER
The example nested HTML elements above are composed of the following:
- start tag :<p>
- start tag: <i>
- element content :italicized text
- end tag :</i>
- end tag :</p>
The second tag i.e. <i> italicizes the text within element content
EMPTY ELEMENTS
Empty Elements are elements that do not have an element content and an end tag.
A List of commonly used empty elements :
- <meta />
- <link />
- <img />
- <br />
- <hr />
- <input />
Post a Comment