-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHTML-structure-syntax-tags.html
More file actions
31 lines (31 loc) · 3.13 KB
/
HTML-structure-syntax-tags.html
File metadata and controls
31 lines (31 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<title>HTML Structure, Syntax, and Tags</title>
</head>
<body>
<h1><span style="color: #0000ff;"><strong>The Basic Structure and Syntax for HTML</strong></span></h1>
<p> </p>
<p>HTML is a web language. It is used to design web pages or to arrange a website's page layouts. HTML stands for Hypertext Markup Language, and as the name implies, it is a markup language rather than a programming language. So, no such error can occur during the execution of HTML code. HTML code was rendered by the browser. It was not compiled or interpreted. </p>
<p>HTML uses specified tags and attributes to instruct browsers on how to display text, which includes what format, style, font size, and pictures to display. HTML is a case-insensitive language. Case insensitive means that there is no distinction between upper and lower case (capital and small letters), which are both viewed as the same; for example, 'P' and 'p' are both the same here. In HTML, tags are classified into two types:</p>
<ul>
<li><span style="color: #ff0000;"><strong>Paired tags:</strong></span>These tags come in pairs. They have both opening<span style="color: #ff0000;">(<span class="highlight--red">< ></span>)</span> and closing<span style="color: #ff0000;">(<span class="highlight--red"></ ></span>)</span> tags. For eg, <span style="color: #ff0000;"><p></span> ...<span style="color: #ff0000;"></p></span></li>
<li><span style="color: #ff0000;"><strong>Empty tags:</strong></span>These tags do not come in pairs and contain no information. For eg, <span style="color: #ff0000;"><img src="" alt=""></span></li>
</ul>
<p>An HTML document is divided into two parts:</p>
<ul>
<li><span style="color: #ff0000;"><strong>Head part</strong>-</span> The title and metadata of a web document are contained in the head element.</li>
<li><span style="color: #ff0000;"><strong>Body part</strong>-</span> The body element includes the information that you wish to display on a web page. To make your web pages HTML <span class="highlight--red">4</span> compatible, include a document type declaration (<strong>DTD</strong>) before the HTML element. When you create a new web page, many web publishing software will automatically add <strong>DTD</strong>; and basic tags. The first tag on a web page shows the markup language used for the document. The tag offers information about the web page. Finally, the content appears in the tag.</li>
</ul>
<p>An HTML document's basic structure consists of<span class="highlight--red">5</span> elements:</p>
<ul>
<li><span style="color: #ff0000;"><!DOCTYPE></span></li>
<li><span style="color: #ff0000;"><html></span></li>
<li><span style="color: #ff0000;"><head></span></li>
<li><span style="color: #ff0000;"><title></span></li>
<li><span style="color: #ff0000;"><body></span></li>
</ul>
</section>
<p><a href="https://www.scaler.com/topics/structure-of-html-document/">Source Website</a></p>
</body>
</html>