element is used as a container that
divides an HTML document into sections and is short
{for “division”.
elements can contain flow
content such as headings, paragraphs, links, Images,
ete,
[Eodelcademy
ol>
Li B)HTML Structure
HTML is organized into a family tree structure. HTML
elements can have parents, grandparents, siblings,
children, grandchildren, et.
Closing Tag
‘An HTML closing tagis used to denote the end of an
HTML element. The syntax fora closing tagis a lft
angle bracket < followed by a forward slash / then
the element name and aright angle bracket to close
>
Attribute Name and Values
HTML attributes consist of a name and a value using the
following syntax: name="Value" and can be added
to the opening tag of an HTML element to configure or
change the behavior of the element.
Line Break Element
The
line break element will ereate a ine break
In text and is especially useful where a division of text is
required, ike in a postal address. The line break
element requires only an opening tag and must not
have a closing tag.
ha.
aL
bod’
tName name
[Eodelcademy
na.
‘elementName>
![]()
Image Element
HIML image
![]()
elements embed images in
documents, The STC attribute contains the image URL
and is mandatory.
![]()
is an empty element
‘meaning it should not have @ closing tag.
~ Heading Elements
HTML can use six different levels of heading elements.
The heading elements are ordered from the highest
level to the lowest level
Paragraph Element
The
paragraph element contains and displays a
block of text
Unique ID Attributes
InHTML, specific and unique id attributes can be
assigned to different elements in order to differentiate
between them,
When needed, the id value can be called upon by CSS
and JavaScript to manipulate, format, and perform
specific instructions on that element and that element
only. Vaid id attributes should begin with a letter and
should only contain letters ( 2 ) digits (0-9 ),
hyphens (=) underscores (_,and periods (
img sro="image.png
AL RL
2
3
P:
nl id
[EodelcademyHTML Attributes
HTML attributes are values added to the openin
{an element to configure the element or change the
element's default behavior. In the provided example, we
Bof
are giving the
(paragraph) element a unique
Identifier using the id attribute and changing the color
of the default text using the style attribute
Unordered List Element
The unordered ist element is used to create a
list of items in no particular order. Each individual ist
item will have a bullet point by default.
alt Attribute
An
element can have alternative text via the
alt attribute. The alternative text willbe displayed if
an image fells to render due to an incorrect URL, if the
Image format is not supported by the browser, i the
Image is blocked from being displayed, or if the image
has not been received from the URL.
The text willbe read sloud if sereen reading software is
Used and helps support visually impaired users by
providing a text descriptor for the image content on a
webpage.
Body Element
The element represents the content of an
HTML document. Content inside tags re
rendered on the web browsers.
Note: There can be only one element in a
document.
[Eodelcademy
p id="my-paragzaph" style="
ul
List
1 mess
ul
img h/to/image" a
bing image
Span Element
The element is an inline container for text
and can be used to group text for styling purposes.
However, as is a generic container to
separate pieces of text from a larger body of tex, its p>
Use should be avoided ia more semantic element is
available
Strong Element
The element highlights important, serious, P strong
cr urgent text and browsers will normally render this
highlighted text in bold by default.
P
HTML Element
‘An HTML element s a piece of content in an HTML > .:
document and uses the following syntax: opening tag +
content + closing tag, In the code provided:
+ isthe opening tag,
+ Hello World! is the content.
+
is the closing tag
HTML Tag
The syntax for a single HTML tag is an opening angle div:
bracket < followed by the element name and a
closing angle bracket > . Here is an example of an
opening tag.
Print 8 Share v
a