HTML 5 Tutorial #3 - HTML Basic

By @cj231/25/2018steemit

HTML Basic Examples

I will give you some HTML basic example tags but don't worry if you don't know these examples since you will learn about them in the next tutorials.

HTML Documents

All HTML documents must start with a document type declaration. HTML versions have its own declaration type and since we're going to use HTML 5, the declaration should be:
< !DOCTYPE html >.
After the declaration, HTML document itself begins with < html > and ends with < /html >.
The visible part of the HTML document is between < body > and < /body >.

example.png

HTML Headings

There are 6 HTML headings and those are < h1 > to < h6 >.
< h1 > defines the most important heading and < h6 > is the least important heading.

example.png

HTML Paragraphs

If the content is a paragraph, then you must label it using HTML paragraph tag. It is defined with the < p > tag:

example.png

HTML Links

HTML links are those clickable and moving you to another web page or content. It is defined with the < a > tag:

example.png

< a > or anchor tag has always an attribute of href to know or define where is the destination when you clicked the link. In the example above, once you clicked "This is a link", your browser will redirect or move you to this website: https://steemit.com. Attributes are used to provide additional information about HTML elements.

HTML Images

If you want to insert an image then you have to use the HTML image tag. It is defined with the < img > tag.

example.png

As you can see, < img > has also attributes.
The src or source attribute specify where the image located and what is the name of the image so the browser will find and display it.
The alt or alternative information attribute defines what is the name of the image so if the image is not displayed, a text which is the name of the image will be displayed.
The width and height attributes give you the control to change image size.


Note: There should be no space in the HTML tags or between the angle brackets and element name. I just put a space for it to display the tags as it will hide or not display without a space. Remember, web browser don't display HTML tags.


HTML 5 Tutorials:

HTML 5 Tutorial #1 - Introduction
HTML 5 Tutorial #2 - HTML Editors

20

comments