HTML Body Tag | Heading Tag |
tag
1.2.4 Body Tag
The <body>
tag is used to define the visible content of the webpage. Everything that is displayed on the web page, such as text, images, links, tables, and forms, goes inside the <body>
tag.
Example:
Everything inside the <body>
tag is visible to the user when they open the webpage in a browser.
1.2.5 Heading Tags
HTML provides six levels of headings, from <h1>
(the largest) to <h6>
(the smallest). These tags are used to structure the content hierarchically and make it more readable for users and search engines.
Example:
<h1>
is typically used for the main title of the page.<h2>
to<h6>
are used for subheadings, with<h2>
being a second-level heading,<h3>
a third-level heading, and so on.
1.2.6 <p>
Tag
The <p>
tag is used to define a paragraph. It is one of the most basic and commonly used tags in HTML.
Example:
- The
<p>
tag automatically adds space before and after the text, creating a visual separation between paragraphs.
1.2.7 HTML Style
The <style>
tag is used to define CSS styles directly within an HTML document. You can add styles for elements like text color, font size, background color, etc.
Example of using the <style>
tag within the <head>
section:
In this example:
- The
<style>
tag is used to define CSS styles. body { background-color: lightblue; }
changes the background color of the page.h1 { color: darkblue; }
changes the color of the heading text.p { font-size: 18px; }
adjusts the font size of the paragraph.
Comments
Post a Comment