Hypertext Markup Language (HTML):
HTML is the standard markup language for Web pages. With HTML you can create your own Website. Learning HTML for every programmer is very useful.
What is HTML?
1. The full form for HTML is Hyper Text Markup Language.
2. HTML describes the structure of a Web page.
3. there are various HTML elements. This HTML elements tell the browser how to display the content.
4. HTML elements are represented by tags.
5. Examples of tags are "heading tag", "paragraph tag", "table tag", "break tag" and so on...
A Simple HTML document:
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
Explanation:
1. The <!DOCTYPE html> declaration defines this document to be HTML5
2. The <html> element - root element of an HTML page
3. The <head> element contains meta information about the document
4. The <title> element - specifies a title for the document
5. The <body> element - contains the visible page content
6. The <h1> element defines a large heading
7. The <p> element defines a paragraph
HTML Elements:
An HTML element usually consists of a start tag and an end tag, with the content inserted in between the tags.
For example:
<tagname>
Content goes here...
</tagname>
Let's have a look at the below table for better understanding:
Start tag | Content | End tag |
<p> | This is a paragraph content | </p> |
<div> | This is a division content | </div> |
<br /> |
Here <p>....</p> is an HTML element, <div>...</div> is another HTML element. There are some HTML elements which don't need to be closed, such as <img.../>, <hr /> and <br /> elements. These are known as void or empty elements.
Empty or void elements do not have an end tag, such as the <br /> or <hr /> tags.
Tag vs. Element:
An HTML element is defined by a starting tag. If the element contains some content inside it, it ends with a closing tag.
For example, '<p>' is starting tag of a paragraph and '</p>' is closing tag of the same paragraph but '<p>This is paragraph</p>' is a paragraph element.
Case Sensitivity:
HTML tags are not case sensitive: <P> means the same as <p>.
The HTML standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML.
Conclusion:
So, there is a long way in your journey to learn web development. These were just some of the basics of HTML (HyperText Markup Language). You can easily look up more information on HTML tags on different resources available on the internet. We will be looking at more about HTML tags in my later blogs.
Happy Learning !
So, there is a long way in your journey to learn web development. These were just some of the basics of HTML (HyperText Markup Language). You can easily look up more information on HTML tags on different resources available on the internet. We will be looking at more about HTML tags in my later blogs.
Happy Learning !
Hii
ReplyDelete