In this summary, we will know about the text based elements you are likely to use the most.
~PARAGRAPH ELEMENT:
If you want to create paragraph in HTML, we need to use the paragraph element, which will add a newline after each of our paragraph. A paragraph element is defined by wrapping text content with
tag.
<html>
<head>
</head>
<body>
<p>juhueiryhuiedjkwmdxLksj</p>
<p>iuyhr8w3yr9ijeqkwmsqo</p>
</body>
</html>
~HEADINGS ELEMENT:
There are six different levels of heading tag represents that heading's level. h1 is the most important and is larger than the other headings,and h6 is the lowest level and therefore the smallest of the headings.
For example, to create an h1 heading, we wrap our heading text in a
tag.
<html>
<head>
</head>
<body>
<h1>........</h1>
<h2>........</h2>
<h3>........</h3>
<h4>........</h4>
<h5>........</h5>
<h6>........</h6>
</body>
</html>
<html>
<head>
</head>
<body>
<h1>........</h1>
<h2>........</h2>
<h3>........</h3>
<h4>........</h4>
<h5>........</h5>
<h6>........</h6>
</body>
</html>
~STRONG ELEMENT:
The element makes the text bold.It also marks semantically marks text as important.
<html>
<head>
</head>
<body>
<strong> this is dev community</strong>
</body>
</html>
~Em Element:
This makes text italic. It also semantically place emphasis on the text, which again affects things like screen readers.
<html>
<head>
</head>
<body>
<em>some emphasized text</em>
</body>
</html>
~NESTING AND INDENTATION:
When we indent any elements, that are within other elements known as nesting element.
When we nest any elements within other elements, we create a parent and child relationship between them. The nested element are the children and the elements they are nested within is the parent.
*We use indentation to make the level of nesting clear and readable for ourselves and other developers who will work with our html in the future.
It is recommended to intent any child elements by two spaces.
~HTML COMMENTS:
HTML comments are not visible to the browser; they allow us to comment on our code that so that other developers or our future selves can read them and get some context about something that might not be clear in the code.
<html>
<head>
</head>
<body>
<h1>View the html to see the hidden comments</h1>
<!--I am a html comment -->
<p>yfyrgjhliuouoiujkljlkjo</p>
<!--I am another html comment -->
</body>
</html
USE THESE HTML ELEMENTS AND CREATE A NEW WEBPAGE.
THANK YOU......
Top comments (0)