Professional Documents
Culture Documents
HTML
HTML
<html>
<head>
</head>
<body bgcolor="red">
<center>
</center>
</body>
</html>
Output :
7. !DOCTYPE html>
<html>
<head>
<title>Frameset Example</title>
</head>
</frameset>
</html>
```
In the above example, we have created a webpage that uses the \<frame\> tag to divide the page into
two frames with a border. The frameset is defined using the \<frameset\> tag, which includes two \
<frame\> tags, one for the menu and one for the content.
- “cols”: This attribute specifies the width of the frames. In this example, the first frame will be 25% of
the total width and the second frame will be 75%.
- “border”: This attribute sets the thickness of the border surrounding each frame.
- “bordercolor”: This attribute sets the color of the border surrounding each frame.
The \<frame\> tags each specify a “src” attribute that specifies the URL of the webpage to be displayed
in that frame. Additionally, each frame is given a “name” attribute, which can be used to target that
frame when linking or manipulating elements on the page.
You can save the frameset code in a file with “.html” extension and then create two separate HTML files,
named “menu.html” and “content.html”, which will be loaded into each of the two frames. The
menu.html will be displayed in the first frame and content.html will be displayed in the second frame.
5.
OCTYPE html>
<html>
<head>
</head>
<body>
<label for=”email”>Email:</label>
<label for=”position”>Position:</label>
<option value=””>--Select--</option>
<option value=”Manager”>Manager</option>
<option value=”Supervisor”>Supervisor</option>
<option value=”Marketing”>Marketing</option>
</select><br>
</form>
</body>
</html>
```
In this example, we have created a simple employee registration form that collects the following
information:
- First name
- Last name
- Email address
- Phone number
- Expected salary
Each input is created using an \<input\> tag with a unique “id” and a corresponding “name” attribute.
We also use labels to give users clear information about what each input is for. The “required” attribute
is added to each input to ensure none of the required fields are left blank.
Finally, the \<form\> tag is used to wrap around all of the inputs, with an “action” attribute that specifies
the URL of the script that will process the submitted data. In this case, that script is “submit.php”. The
“method” attribute is set to “post” to ensure the submitted data is not visible in the URL. Lastly, a
submit button is included to allow users to submit their data.
4.
!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>Video Tag</h2>
</video>
</video></p>
<h2>Audio Tag</h2>
<audio controls>
</audio>
</audio></p>
<h2>Image Tag</h2>
<figure>
<figcaption>Example Image</figcaption>
</figure>
<p><strong>Syntax:</strong> <figure><br>
</figure></p>
<h2>Embedded Content</h2>
<h2>Iframe Tag</h2>
</body>
</html>
- \<video\>: Used to embed video content on a webpage. The “width” and “height” attributes are used
to specify the dimensions of the video element, while the “controls” attribute adds a control bar to the
video player. Multiple \<source\> tags can be used to specify different video formats for different
browsers. The fallback content is displayed if the browser does not support the video tag.
- \<audio\>: Similar to \<video\>, but used for embedding audio content. The “controls” attribute adds a
control bar to the audio player. Again, multiple \<source\> tags can be used to specify different audio
formats for different browsers.
- \<img\>: Used to embed images on a webpage. The “src” attribute specifies the image file, while the
“alt” attribute is used to provide alternative text for screen readers and when the image cannot be
displayed. The “width” and “height” attributes can be used to specify the dimensions of the image.
- \<figure\> and \<figcaption\>: Used to associate an image with a caption. The \<figure\> tag wraps
around the \<img\> tag, while the caption text is placed inside the \<figcaption\> tag.
- \<object\>: Used to embed external content, such as Flash animations. The “data” attribute specifies
the location of the external file.
- \<iframe\>: Used to embed an entire webpage within another webpage. The “src” attribute specifies
the location of the embedded page, while the “width” and “height” attributes control the dimensions of
the embedded content.
2.
!DOCTYPE html>
<html>
<head>
<title>Resume</title>
<style>
Body {
Font-family: monospace;
Font-size: 14px;
H1 {
Font-size: 24px;
Text-align: center;
H2 {
Font-size: 20px;
Margin-top: 30px;
Margin-bottom: 10px;
Ul {
Margin-top: 0px;
Margin-bottom: 10px;
P{
Margin-top: 0px;
Margin-bottom: 10px;
Sup {
Font-size: 10px;
Vertical-align: top;
Line-height: 0;
Margin-left: 2px;
Sub {
Font-size: 10px;
Vertical-align: bottom;
Line-height: 0;
Margin-left: 2px;
</style>
</head>
<body>
<h1>John Doe</h1>
<h2>Personal Information</h2>
<ul>
<li><strong>Email:</strong> john.doe@email.com</li>
<li><strong>Phone:</strong> 555-555-5555</li>
</ul>
<h2>Summary</h2>
<p>Experienced web developer with over 5 years of experience. Skilled in HTML, CSS, JavaScript,
and PHP. Highly motivated and passionate about creating innovative and user-friendly web
applications.</p>
<h2>Education</h2>
<ul>
<li>Designed and developed responsive web applications using HTML, CSS, and
JavaScript</li>
</ul>
<ul>
</ul>
</body>
</html>
1.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>Heading Tags</h2>
<li><code><h2></code></li>
<li><code><h3></code></li>
<li><code><h4></code></li>
<li><code><h5></code></li>
</ul>
<h2>Paragraphs</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tempor semper ex in
malesuada.</p>
<h2>Formatting Text</h2>
<ul>
<li><code><b></code> (bold)</li>
<li><code><i></code> (italic)</li>
<li><code><u></code> (underline)</li>
<li><code><sup></code> (superscript)</li>
<li><code><sub></code> (subscript)</li>
</ul>
<h2>Horizontal Line</h2>
<hr>
<h2>Quotations</h2>
<li><code><blockquote></code></li>
<li><code><q></code></li>
</ul>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tempor semper ex in
malesuada.</p>
</blockquote>
<p><q>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</q> - John Doe</p>
<h2>Lists</h2>
<ul>
</ul>
<h3>Unordered List</h3>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<h3>Ordered List</h3>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
</body>
</html>