HTML is not a programming language; It is a markup language, and is used to tell your browser how to display the web pages you visit. It can be complicated or simple, depending on how the web designer wants. HTML consists of a number of elements that you use to nest or wrap different pieces of content to make the content appear or act in a certain way. Enclosing tags can make a word or image a link to something else, can make words in italics, make the font larger or smaller, and so on.
The main parts of our element are:
Opening tag: Consists of the name of the element (in this case, “p”) enclosed in opening and closing angle brackets. The opening tag indicates where the item begins or takes effect, in this case where the paragraph begins.
Closing tag: This is the same as the opening tag, except that it includes a slash in front of the element name. The closing element indicates where the element ends, in this case where the paragraph ends. The lack of a closing tag is one of the most common beginner mistakes and can lead to strange results.
Content: This is the content of the element, which in this case is just text.
Element: An opening tag, a closing tag, and content together make up the element.
Attributes contain additional information about the element that you do not want to show in the actual content. In this case, class is the attribute name, and editor-note is the attribute value. The class allows you to give an element an identification name, which can later be used to access the element with style information and other things.
An attribute must always have:
A space between it and the name of the element (or the previous attribute if the element already has one or more attributes).
The name of the attribute followed by an equal sign.
An attribute value enclosed in quotation marks on both sides.
You can also place elements inside other elements - this is called an attachment. If we want to say that our cat is very annoyed, we can wrap the word “very” in the element, which indicates that the word should be strongly accented.
Top comments (0)