The Main Parts of Our Element Are:: FCM Private Iti
The Main Parts of Our Element Are:: FCM Private Iti
HTML (Hypertext Markup Language) is not a programming language; it is a markup language used
to tell your browser how to structure the webpages you visit. HTML consists of a series of
elements, which you use to enclose, wrap, or markup different parts of the content to make it
appear or act a certain way. The enclosing tags can make a bit of content into a hyperlink to link
to another page on the web, italicize words, and so on.
The main parts of our element are:
The opening tag: This consists of the name of the element (in this case, p), wrapped in opening
and closing angle brackets. This states where the element begins, or starts to take effect — in
this case where the start of the paragraph is.
The closing tag: This is the same as the opening tag, except that it includes a forward slash before
the element name. This states where the element ends — in this case where the end of the
paragraph is. Failing to include a closing tag is a common beginner error and can lead to strange
results.
The content: This is the content of the element, which in this case is just text.
The element: The opening tag plus the closing tag plus the content equals the element.
Attributes
Attributes contain extra information about the element which you don't want to appear in the
actual content. In this case, the class attribute allows you to give the element an identifying name
that can be later used to target the element with style information and other things.
An attribute should have:
A space between it and the element name (or the previous attribute, if the element already has
one or more attributes.)
The attribute name, followed by an equals sign.
An attribute value, with opening and closing quote marks wrapped around it.
Anatomy of a HTML document
That wraps up the basics of individual HTML elements, but they aren't very useful on their own.
Following are individual elements are combined to form an entire HTML page:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My test page</title>
<!DOCTYPE html>: The doctype. In the mists of time, when HTML was young (about 1991/2),
doctypes were meant to act as links to a set of rules that the HTML page had to follow to be
considered good HTML, which could mean automatic error checking and other useful things.
<html></html>: The <html> element. This element wraps all the content on the entire page, and
is sometimes known as the root element.
<head></head>: The <head> element. This element acts as a container for all the stuff you want
to include on the HTML page that isn't the content you are showing to your page's viewers. This
includes things like keywords and a page description that you want to appear in search results,
CSS to style our content, character set declarations, and more. You'll learn more about this in the
next article in the series.
<meta charset="utf-8">: This element sets the character set your document should use to UTF-
8, which includes most characters from the vast majority of human written languages. Essentially
it can now handle any textual content you might put on it. There is no reason not to set this, and
it can help avoid some problems later.
<title></title>: The <title> element. This sets the title of your page, which is the title that appears
in the browser tab the page is loaded in, and is used to describe the page when you
bookmark/favourite it.
<body></body>: The <body> element. This contains all the content that you want to show to web
users when they visit your page, whether that's text, images, videos, games, playable audio
tracks, or whatever else