What are Elements
Description
The following code shows a simple example of an HTML element applied to some text.
I like <code>web</code> and CSS.
The start tag is <code>, and the end tag is </code>. Between the tags is the element's content, which is web. Together, the tags and the content form the code element.
Note
We use the elements to do the following:
- Elements tell the browser about your content.
- The effect of the element is applied to the element contents.
- Each of the HTML elements has a different and specific meaning. The code element, for example, represents a fragment of computer code.
Note 2
Element names are not case sensitive.
The browsers will recognize <CODE> and <code>, and even <CoDe>, as start tags for the code element.
In general, the convention is to adopt a single case format and stick to it. The more common style has been to use lowercase characters throughout.
Note 3
HTML defines different types of element that fulfill various roles in an HTML document.
The code element is an example of a sematic element. Semantic elements allow us to define the meaning of our content and the relationships between different parts of the content.