element is used as a container that divides, di
fan HTML document into sections and is short for cn
“division”.
elements can contain flow content
2 P.
such as headings, paragraphs, ins, images, et.
HTML Structure
HTML is organized into a family tree structure. HTML
lements can have parents, grandparents, siblings,
children, grandchildren, etc.
Closing Tag
‘An HTML closing tag is used to denote the end of an
HTML element. The syntax for a closing tagis & left angle
bracket < followed by a forward slash / then the
‘element name and a right angle bracket to close >
Attribute Name and Values
HTML attributes consist of a name and a value using the elementNane name="value"> Line Break Element
The
line break element will create @ ine breakin
text and is especially useful where a civision of text is
required, lke in a postal address. The line break element
requires only an opening tag and must not have a closing
tae.
![]()
Image Element
HTML image
![]()
elements embed images in
documents. The ste attribute contains the Image URL
and is mandatory.
![]()
is an empty element meaning
it should not have a closing tag.
~ ché> Heading Elements
HTML can use six different levels of heading elements.
‘The heading elements are ordered from the highest level
< tothe lowest level
Paragraph Element
‘The
paragraph element contains and displays @
block of text
Elements and Structure Cheatsheet | Codecademy
[codelcademy
nitos:www.codecademycomearntearn-tni/modulesiearn-htnl-elementsicheatsheet mooioar24, 13:40 Learn HTML: Elements and Structure Cheatsheet | Codecademy
[codelcademy
ue ID Attributes
InHITML, specific and unique id attributes can be
assigned to different elements in order to differentiate
Al" hu
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 Valid id attributes should begin with a letter and
should only contain letters ( a-Z., digits ( 0-9 J, hyphens
(-).underscores (__), and periods (
HTML Attributes
HTML attributes are values added to the opening tag of an
‘element to configure the element or change the
my-paragr: style="color
‘element's default behavior. In the provided example, we
are giving the
(paragraph element a unique
identifier using the id attribute and changing the color P:
‘of the default text using the style attribute.
Unordered List Element
‘The unordered lst element is used to create alist
Li
4 Mei
of temsin no pareuar order, Each indhvdua it Rem
will have a bullet point by default. ¢
nitos:www.codecademycomearntearn-tni/modulesiearn-htnl-elementsicheatsheet
sinooioar24, 13:40 Learn HTML: Elements and Structure Cheatsheet | Codecademy
alt Attribute
‘An
element can have alternative text via the alt
attribute, The alternative text willbe displayed if an image
falls to render due to an incorrect URL, Ifthe image
format is not supported by the browser, ifthe image is
blocked from being displayed, or if the image has not
been received from the URL.
‘The text willbe read aloud if screen reading software i
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 are
rendered on the web browsers.
Note: There can be only one element ine
document
Span Element
‘The element isan inline container for text and
‘can be used to group text for styling purposes. However,
as isa generic container to separate pieces of
text from a larger body of text, its use should be avoided if
‘a more semantic element is available.
Strong Element
‘The element highlights important, serious, or
Urgent text and browsers wil normally render this
highlighted text in bold by default.
nitos:www.codecademycomearntearn-tni/modulesiearn-htnl-elementsicheatsheet
describing
pan
span
[codelcademy
anooioar24, 13:40 Learn HTML: Elements and Structure Cheatsheet | Codecademy
HTML Element
‘An HTML element is apiece of content in an HTML
document and uses the following syntax: opening tag +
content + closing tag In the code provides:
+ is the opening tag
+ Hello World! is the content,
+ Iethe closing tag
HTML Tag
‘The syntax fora single HTML tag isan opening angle
bracket < followed by the element name and a closing
angle bracket > . Here is an example of an opening
tag,
ch Print o€ Share v
nitos:www.codecademycomearntearn-tni/modulesiearn-htnl-elementsicheatsheet
[codelcademy
1010