HTML Elements are the building block of a webpage. We use elements to define the structure of our HTML document. HTML is typically made up of
- Opening tag
- Closing tag
HTML Element syntax
The above example shows how to write a simple text paragraph using p tag.
Html Tags are labels (names) you use to mark up the start and end of an element. It begins with a less-than sign "<" followed by the tag name and end with a greater-than sign ">".
Element is made up of opening tag, contents and a closing tag.
- Opening tag,
- Opening tag marks the opening of an element, this is where you set the attributes.
- Tag Content
- This is where you put the contents of the element.
- Closing tag.
- This marks the end of an element.
Common html Elements
- <p> - paragraph
- <h1> - heading tag
- <img> - image tag
- <a> - Anchor tag
- <li> - Tags
Attribute defines how an element behaves. It’s a key/value pair that is written inside an opening tag.
href="https://coding180.com" attribute in a link <a> tag specifies the destination of a link when clicked.
we will talk on more on Elements, tags and attributes in the comming lessons.//= htmlentities($post["body"]); ?>