HTML Elements

MDN Docs: Elements

In HTML, There are opening tags and closing tags.

Opening:

<tag>
Closing:
</tag>

Element: Is an opening tag, a closing tag, and the code in between.

Note: Most have to be closed to function, if they don't they are considered an "empty tag", meaning they have no closing tag.

There are different element types:

<a>:
TheAnchor Tag is used to create links. (ex: <a> href="insert link here"</a>)


<address>
Address adds emphasis to contact info.


<div>:
A Div is used to group content so it can be easily styled using the class or id attributes. Visual explaintion on page 3!


<abbr>:
Abbrevation Defines the text as an abbrevation or acronym.


<em>:
EM needs to be closed, makes text italic.


<hr>:
Horizonal Rule-"Draws" a line across the site.


<img>:
Imgage tag allows us to add images. src stands for source. Alt is used if the image cant be shown, it displays placeholder text instead (ex: <img> src="insert link here" alt="picture description goes here")

<input>:
Input is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available.
Theres many input types! The link provided shows a list of types to be used with input.


<br>:
Line Break


<p>:
Paragraphs are used to wrap text into a "block" (making text eaiser to read and style).


<strong>:
Strong needs to be closed, makes the text bold.


<time>
Time is used to indicate a date or time. Notice: time does NOT affect how the text is displayed.