Professional Documents
Culture Documents
HTML fdc1
HTML fdc1
CSS introduces styles and layouts to provide beautiful feels and looks.
Definition:
Syntax:
- Nested tags
In the above example, the HTML comment is used to add a note or comment within the code. It won't be displayed on
the web page. The commented-out <p> tag is an example of how you can temporarily remove an element from
rendering.
HTML TAGS
Heading tag in HTML (H1 to H6):
HTML provides six heading tags, <h1> to <h6>, for defining different levels of headings. These tags are used to
structure the content hierarchy and indicate the importance of headings on a web page. The <h1> tag represents
the highest level heading, typically used for the main title or heading of a page, while <h6> represents the lowest
level heading. Heading tags also come with default styling, with <h1> being the largest and <h6> the smallest.
<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Sub-subheading</h3>
In this example, heading tags from <h1> to <h3> are used to create headings of different levels. The text within
the tags represents the content of the headings. The <h1> tag represents the highest level heading, while <h3>
represents a lower level heading.
HTML TAGS
. Paragraph tag:
The <p> tag in HTML is used to define a paragraph. It is a block-level element that represents a
distinct section of text or content.
The <p> tag is used to define paragraphs of text. In this example, two paragraphs are created, and
each <p> tag encloses a separate block of text.
v. Anchor Tag:
The HTML <a> tag, also known as the anchor tag, is used to create hyperlinks or links to other web pages, files, or specific sections within a page. It
allows users to navigate between different pages or locations on the web. The <a> tag requires an href attribute that specifies the URL or
destination of the link. Additionally, it can contain text or other HTML elements as its content.
In the above example, the <a> tag is used to create a hyperlink. The href attribute specifies the URL ("https://www.example.com") to which the
link should navigate. The text "Visit Example" represents the clickable text displayed on the web page.
The <img> tag is used in HTML to embed or display images on a web page. It is a self-closing tag that does not require a closing tag. The <img> tag
requires the src attribute, which specifies the source URL or file path of the image to be displayed. It also supports optional attributes like alt
(alternative text for accessibility and when the image cannot be displayed), width, height, and more.
The <img> tag is used to embed an image in HTML. In this example, the src attribute specifies the image file path ("image.jpg"), and the alt
attribute provides alternative text that is displayed when the image cannot be loaded or for accessibility purposes.
Tag for formatting:-
In HTML, there are various tags used for formatting and styling text. Some commonly used
formatting tags include <strong> (to make text bold), <em> (to emphasize text, typically rendered in
italics), <u> (to underline text), <del> (to represent deleted or struck-through text), <sub> (to
subscript text), <sup> (to superscript text), and <code> (to represent inline code or program code
snippets).
In this example, the <strong> tag is used to make the word "bold" appear in bold font weight, and
the <em> tag is used to emphasize the word "emphasized," typically displayed in italics.
Div & Span
The <div> and <span> tags are used as container elements in HTML for grouping and styling other
elements or sections of a web page. <div class="container">
<h3>Title</h3>
</div>
In the first example, the <div> tag is used to create a container element with a class attribute. It
encloses a heading and a paragraph, providing a way to group and style them together. In the
second example, the <span> tag is used to create an inline element, and inline styling is applied
using the style attribute to make the text appear in blue color.
List in HTML
HTML provides three types of lists: ordered lists (<ol>), unordered lists (<ul>), and definition lists (<dl>).
Ordered List (<ol>): Represents a numbered list where each item is ordered sequentially.
Unordered List (<ul>): Represents a bulleted list where each item is preceded by a bullet point.
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
Tables in HTML
HTML <table> element is used to create tabular data. It consists of rows (<tr>), columns (<td>), and optional header cells (<th>).
<th>: Represents a table header cell, typically used for column headings.
Example of a simple table: <td>25</td>
html </tr>
<tr>
<table>
<td>Jane</td>
<tr>
<td>30</td>
<th>Name</th>
</tr>
<th>Age</th>
</table>
</tr>
<tr>
<td>John</td>
Forms in HTML
HTML <form> element is used to create interactive forms that allow users to input data. It contains
form controls like input fields, checkboxes, radio buttons, and buttons.
html
<form>
<label for="name">Name:</label>
<label for="email">Email:</label>
<button type="submit">Submit</button>
</form>
Frames in HTML
Frames in HTML:
HTML <iframe> element is used to embed another HTML document within the current document,
creating a frame or window.
<html> </html>
<head>
<title>Frames Example</title>
</head>
<frame src="left.html">
<frame src="right.html">
Video tag
HTML <video> element is used to embed videos or audio content on a web page.
Example of a video:
These are the descriptive details and examples of the HTML elements you requested.