A webpage is a document that contains codes, or written in HTML to describe the content on the page

INTRODUCTION

As we all know HTML is a language of the web. It’s used to design the web pages or we can say structure the page layouts of a website.  HTML stands for HYPERTEXT MARKUP LANGUAGE, as its full form suggests it’s not any programming language, a markup language. So, while the execution of HTML code we can’t face any such error. In real HTML code wasn’t compiled or interpreted because HTML code was rendered by the browser. which is similar to the compilation of a program. Html content is parched through the browser to display the content of HTML. 

Course Navigation 
 

HTML DOCUMENTS STRUCTURE

Html used predefined tags and attributes to tell the browser how to display content, means in which format, style, font size, and images to display. Html is a case insensitive language. Case insensitive means there is no difference in upper case and lower case ( capital and small letters) both treated as the same, for r example ‘D’ and ‘d’ both are the same here. 
There are generally two types of tags in HTML: 
 

  1. Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >) tags.
  2. Empty Tags: These tags do not require to be closed.

Below is an example of a (<b>) tag in HTML, which tells the browser to bold the text inside it. 
 

Tags and attributes:  Tags are individuals of html structure, we have to open and close any tag with a forward slash like this <h2> </h2>. There are some variations with the tag some of them are self-closing tag which isn’t required to close and some are empty tag where we can add any attributes in it.  Attributes are additional properties of html tags that define the property of any html tags. i.e. width, height, controls, loops, input, and autoplay. These attributes also help us to store information in meta tags by using name, content, and type attributes. Html documents structured mentioned below: 
 

Structure of an HTML Document

An HTML Document is mainly divided into two parts: 
 

  • HEAD: This contains the information about the HTML document. For Example, the Title of the page, version of HTML, Meta Data, etc.
  • BODY: This contains everything you want to display on the Web Page.

HTML Document Structure

Let us now have a look at the basic structure of HTML. That is the code that is a must for every webpage to have: 
 

HTML

<!DOCTYPE html> 

<!DOCTYPE html>

<html lang="en">

    <head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="author" content="Mr.X">

    <meta name="Linkedin profile" content="WWW.linkedin.com/Mr.X_123" >

    <meta name="description " 

    content="A better place to learn computer science">

    <title>GeeksforGeeks</title>

</head>

<body>

    <h2>GeeksforGeeks</h2>

<p>A computer science portal for geeks</p>

</body>

</html>

Every Webpage must contain this code. Below is the complete explanation of each of the tags used in the above piece of HTML code:
<!DOCTYPE html>: This tag is used to tells the HTML version. This currently tells that the version is HTML 5.0 
<html>  </html> : <html> is a root element of html.  It’s a biggest and main element  in complete  html language, all the tags , elements and attributes  enclosed in it or we can say wrap init , which is used to structure a web page. <html> tag is parent tag of <head> and  <body>  tag , other tags enclosed within <head > and <body>.  In <html > tag we use “lang” attributes to define languages of html page such as <html lang=”en”> here en represents English language. some of them are : es = Spanish , zh-Hans = Chinese, fr= french and el= Greek etc.
<head>: Head tag contains metadata, title, page CSS etc.  Data stored in the <head>  tag is not displayed to the user, it is just written for reference purposes and as a watermark of the owner.  

Note: for better understanding refer above code of html. <title> = to store website name or content to be displayed. <link> = To add/ link css( cascading style sheet) file. <meta> = 1. to store data about website, organisation , creator/ owner 2. for responsive website via attributes 3. to tell compatibility of html with browser <script> = to add javascript file.

<body>: A body tag is used to enclose all the data which a web page has from texts to links. All the content that you see rendered in the browser is contained within this element. Following tags and elements used in the body.

   1 .  <h2> ,<h2> ,<h3> to <h6>
   2.   <p>
   3.   <div> and <span>
   4.   <b>, <i> and<u> 
   5.   <li>,<ul>and<ol>. 
   6.   <img> , <audio> , <video> and<iframe>
   7.   <table> <th> , <thead>and<tr>.  
   8.   <form> 
   9.   <label> and <input> others……….
To learn more about an HTML Document structure, please visit
 

  • //www.geeksforgeeks.org/html-introduction/

HTML is the foundation of web pages, and is used for webpage development by structuring websites and web apps. You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.


What is written in HTML to describe the content of page?

The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

What is a web page in HTML?

Web page. A web page is a simple document displayable by a browser. Such documents are written in the HTML language (which we look into in more detail in other articles). A web page can embed a variety of different types of resources such as: style information — controlling a page's look-and-feel.

What does a web page consists of?

A web page is a structured document that primarily consists of hypertext, text with hyperlinks. Hyperlinks point the user to other web resources, primarily other web pages, and to different sections of the same web page.

What do you mean by website and webpage?

The webpage is a single document on the web using a unique URL, while a website is a collection of multiple webpages in which information on a related topic or another subject is linked together under the same domain address. Learn more about what is the difference between a website and webpage from the table below.

zusammenhängende Posts

Toplist

Neuester Beitrag

Stichworte