Now lets see the basic body of a HTML program......
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Now lets see the working of the above code...
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Now lets see the working of the above code...
- The DOCTYPE declaration defines the document type
- The text between <html> and </html> describes the starting and ending of the web page respectively.
- The text between <body> and </body> is the visible page content.
- The text between <h1> and </h1> is displayed as a heading. Here 'h' stands for Heading and you can further define more heading like h2,h3,etc.
- The text between <p> and </p> is displayed as a paragraph. Here 'p' stands for paragraph.
HTML Tags
HTML markup tags are usually called HTML tags
- HTML tags are keywords (tag names) surrounded by angle brackets like <html>
- HTML tags normally come in pairs like <b> and </b>
- The first tag in a pair is the start tag(<b>), the second tag is the end tag(</b>).
- The end tag is written like the start tag, with a forward slash before the tag name.
- Start and end tags are also called opening tags and closing tags.
So the basic syntax of a tag in HTML is,
<tagname>content</tagname>
HTML Elements
An HTML element is everything between the start tag and the end tag, including the tags:
EXAMPLE:
<p>This is a paragraph.</p>
Web Browsers
The purpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Opera) is to read HTML documents and display them as web pages.
The browser does not display the HTML tags, but uses the tags to determine how the content of the HTML page is to be presented/displayed to the user.
HTML Versions
Different versions of the HTML since 1991.
Version | Year |
---|---|
HTML | 1991 |
HTML+ | 1993 |
HTML 2.0 | 1995 |
HTML 3.2 | 1997 |
HTML 4.01 | 1999 |
XHTML 1.0 | 2000 |
HTML5 | 2012 |
XHTML5 | 2013 |
No comments:
Post a Comment