Week 11 Basic Tags and Commands in HTML
Week 11 Basic Tags and Commands in HTML
blocks of web pages, and some of the HTML elements are <html>
Code:
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Page Title</title>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
Output:
<h6> where <h1> defines the most important tag and <h6> defines the
Output:
3. Explain about HTML element paragraph?
HTML paragraph is a HTML element which will be defined using tag <p>
Output is:
alternative text, width and height of the image to display and sample
code is
Code:
style=”width:120px;height:150px”>
Output:
Code:
<ul>
<li> Coffee</li>
<li> Tea </li>
<li> Milk </li>
</ul>
Output:
and rows with tag <tr> and cells with tag <td> and code as below:
Code:
<table>
<tr>
<th>Firstname</th>
<th> Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
</table>
Output:
Code:
Output:
8. Why to use the style attribute in the HTML
document?
HTML attribute style can be used with a combination of any HTML
Code:
Output:
document using the <html> tag and language are defined using lang
Code:
<!DOCTYPE html>
<html lang=”en-US”>
<body>
...
...
</body>
</html>
Output:
and we can define special elements for text with special meaning. HTML
Code:
Output:
Intermediate HTML Commands
The intermediate commands are as follows:
<mark> so that it highlight the text enclosed in <mark> element and the
<html><body>
<h2> html <mark> Marked </mark> formtting </h2>
</body></html>
which is enclosed between this element is deleted, and the sample code
is as below:
<html><body>
</body></html>
<html><body>
<p> This is <sup> superscripted </sup> text </p>
the HTML document, which will give useful information to browsers, and
<html><body>
<p> The <abbr title=”World Health Organization” >WHO </abbr>
was founded in 1948 </p>
</body></html>
5. How to mention the address in the HTML document?
In HTML, we can mention the address in HTML document using HTML
below:
<html><body>
<address>
Written by Srinivas <br>
dasu.com <br>
Pincode : 500084, Hyderabad <br>
India
</address>
</body></html>
and is defined using the tag <iframe> and src attribute specifies the URL
<html><body>
<iframe src=”demo.html” height=”300” width=”300” > </iframe>
</body></html>
HTML document, and the target attribute to the link must refer to the
<html><body>
<iframe src=”demo.html” name=”iframe1”> </iframe>
<p> <a href=”www.google.com” target=”iframe1”> Google.co.in
</a> </p>
</body></html>
• It’s good to hide some fields where we don’t want a user to edit
those fields.
Source: https://www.educba.com/html-commands/