Introduction
On this post we're gone to talk about how to write html code, so first we need to know what is html. The acronym HTML means "Hypertext Mark-up Language". Consist on a language that need tags for declare the necessary functions for work up. The html code help us on the web page development, this because is easier and quicker used it.
Tags
On this language are necessary tags for represent some characteristics on the page. We use the symbols "less than <" and the "more than >" for start a tag. For example:
<tag>
And we ended with almost the same symbol. Something like this:
<!tag>
So, a complete instruction on html look like this:
<tag> Some text if we need it <!tag>
There exist a lot of tags that can help us to perform our web applications, so the order or the use of this tags are improve for our imagination and abilities for design and distribute the elements, you can consult a list of tags ordered for the type of element here: list of tags for element.
Attributes
The attributes are classes that perform some behaviour on the html elements. The html code, allow us to just put some element on the page, but the attributes allow us to give some structure to our pages. For example:
If we want to upload an image we need to specified the resource in where the image is. Some in the tag img we use the attribute src for specified the path of the image.
If we want to upload an image we need to specified the resource in where the image is. Some in the tag img we use the attribute src for specified the path of the image.
<img src="path/of/picture.jpg">
Every tag can be combined with different attributes, that can modified the behaviour of the component on the page on different ways.
Here is a index of the principles attributes for html tags.
Indentation & Spacing
This section is just a guide about the spacing and indentation on html code. This advices are for have more ordered code:- Open and close your tags at moment.
- Try to have short modules of code. Encapsulate some elements in different files if can.
- Keep things simple.