HTML is the language for creating Web pages and the HTML elements are actually blocks that are used to build a page. Learn the basics to become a front-end professional.
(This article was initially posted on https://www.developermate.com)
HTML stands for HyperText Markup Language. The first web pages was released in 1990 and the pages were only used for presentation. Today the web is a very important piece in our daily lives. You may use many different web browsers to look at web-pages, like: Google Chrome, Opera, Internet Explorer and Firefox.
HTML Page Structure
HTML tags are usually in pairs like
Remember to use a a forward slash when you write the end tag.
HTML attributes are used to modify the value of the HTML element. Elements will often have multiple attributes.
attribute defines a unique id for an HTML element. The id must be unique within the HTML document.
You can use the
HTML Building blocks
The HTML elements can also be called building blocks. These elements are used to build a HTML page. The elements consist of start and end tags and between those tags we put the text or graphic content.
The HTML Block-level Elements
A block level element always starts on a new line. This type of elements also always takes up the full width available on the page. This means that it extends as far as possible to the left and as far as possible to the right.
The HTML Inline Elements
Unlike a Block-level element, an Inline element does not start on a new line. In addition it does not take up the entire width, but just as much width as necessary.
The Empty HTML Elements
There are also HTML-elements that are has no content and these are called empty elements. An empty element that is used frequently is the element
. This is an empty item that has no content.
Lower- or Uppercase?
Although it is not wrong and actually completely valid to use uppercase letters for tags and attributes when writing HTML the convention is to always uses lowercase letters. This is for historical reasons and goes back to XHTML days where the conversation was completely strict and where uppercase letters were not valid.
elements are representing six separate levels of section headings. The highest section is level
and the lowest section is
. You could also say that
has the highest importance and
has the lowest importance.
Headings are not only important for changing the look of the page. Headings are also important when it comes to how search engines work. To index the structure and content of a web page the search engines are using headings.
Users often make a quick check of your page by just reading the headings. It is important to use headings to view the document structure.
element defines a paragraph.
The paragraph tag places a blank line above and below the text.
HTML Links is used to link pages with each other. HTML Links are also called hyperlinks. A website consists of several pages and you should link the pages together. Links makes it easy for users to navigate between pages in your website and even to other websites.