×

HTML Layouts

HTML Layouts

HTML templates provide a way for well-managed, well-structured responsive web pages to be organized. We could say that the HTML layout specifies how web pages can be set up. Web page architecture operates with the visual elements of an HTML document being structured.

Web page layout is the most important thing to bear in mind when designing a website so that with the great, look our website will look professional. We can also use the CSS and JAVASCRIPT based framework to build a responsive and interactive website design models.

HTML Layouts

Each website has a specific style to look at the contents in a particular way.

The following are various elements of HTML5 used to describe the different sections of the webpage.

  • <header>: It is used to define a document header or section header.
  • <nav>: It is used to define a navigation link container.
  • <section>: It is used to identify a document section.
  • <article>: It is used to define a self-contained, independent article.
  • <aside>: It is used to define content in addition to the content (like a sidebar).
  • <footer>: It is used to describe a footer or section of a text.
  • <details>: It is used to define additional data.
  • <summary>: It is used to define the heading for the < details > element.

Description of various Layout elements

HTML <header>

The < header > element is used to create a web page header section. The header contains the webpage introductory content, heading part, logo or icon, and information about authorship.

Example:

<!DOCTYPE html> 
<html> 
<head>             
<title>First Webpage</title> </head> 
<body> 
<header style="background-color: #303030; height: 80px;width: 100%">             
<h1 style="font-size: 30px; color: white;text-align: center; padding-top: 15px;">Welcome to MyFirstWebpage</h1> 
</header> 
</body> 
</html>

Output:

HTML Layouts

HTML <nav>

< nav > is the container for the main navigation link block. It may contain links to the same page or to other pages.

Example:

<!DOCTYPE html>
<html>
<head>
  <style> li{  display: inline-block;   padding: 10px}  </style> 
</head> 
<body>  <nav style="background-color:#bcdeef;">  
<h1 style="text-align: center;">Navgation Links</h1>  <ul>  
<li><a href="#">link1</a></li>   
<li><a href="#">link2</a></li>  
<li><a href="#">link3</a></li>    
<li><a href="#">link4</a></li>                       
</ul>             
</nav> 
</body>
 </html>

Output:

HTML Layouts

HTML <section>

HTML < section > elements are a separate section of a web page that contains a related group of elements. It may include text, photos, tables, videos, etc.

Example:

<!DOCTYPE html>
<html> 
<head>             
<title>Page Section</title> 
</head> 
<body> 
<section style="background-color:#ff7f50; width: 100%; border: 1px solid black;">             <h2>Introduction to HTML</h2> 
<p>HTML is a markup language which is used for creating attractive web pages with the help of styling, and which looks in a nice format on a web browser.</p>
</section>
</body>
</html>    

Output:

HTML Layouts

HTML <article>

The HTML tag is used to contain a self-contained article, such as a big story, a big article, etc.

Example:

<!DOCTYPE html> 
<html> 
<head>             
<title>Article Example</title>
</head> 
<body> <article style="width: 100%; border:2px solid black; background-color: #fff0f5;">             <h2>History of Computer</h2>  
<p>Write your content here for the history of computer</p>
</article>
</body> 
</html>    

Output:

HTML Layouts

HTML <aside>

HTML < aside > Set aside content related to primary content. The content of the < aside > must be linked to the primary content. It can be used as a sidebar for the main content of the web page.

Example:

<!DOCTYPE html>
<html>
<head>
<title>Aside Example</title> 
</head> 
<body> <aside style="background-color:#e6e6fa">             
<h2>Sidebar information</h2>            
<p>This contains information which will represent like a side bar for a webpage</p> 
</aside> 
</body> 
</html>    

Output:

HTML Layouts

The HTML < footer > element defines the footer for this document or web page. It mostly includes author information, copyright information, other links, etc.

Example:

<!DOCTYPE html> 
<html> 
<head>            
 <title>Footer Section</title>
 </head> 
<body> 
<footer style="background-color:#f0f8ff; width: 100%; text-align: left;">             
<h3>Footer Example</h3>            
 <p>© Copyright 2018-2020. </p> 
</footer> 
</body> 
</html>    

Output:

HTML Layouts

HTML <details>

The HTML < details > element is used to add extra details to the web page and can be used to hide or display the details as required.

Example:

<!DOCTYPE html> 
<html> 
<head>            
<title>Deatils element</title>
</head> 
<body> 
<details style="background-color: #f5deb3">            
<summary>This is visible section: click to show other details</summary>        
<p>This section only shows if user want to see it. </p> 
</details> 
</body>
</html>  

Output:

HTML Layouts

HTML <summary>

The HTML < summary > element is used with the < details > element on the web page. It is used as a summary of the content of the < details > element.

Example:

<!DOCTYPE html> 
<html> 
<head>       
<title>Summary Example</title> 
</head> 
<body> 
<details>  <summary>HTML is acronym for?</summary>            
<p style="color: blue; font-size: 20px;">Hypertext Markup Language</p> 
</details>
</body> 
</html>    

Output:

HTML Layouts

Related Topics

HTML Button Disabled

The HTML <button> element has many attributes, one of them is the disabled attribute. The button on which you apply the disabled attribute will not work, or we can say...

4 minutes read.

HTML <samp> tag

The Samp tag in HTML is used for defining the sample output from the computer program. This tag is a phrase type tag and a container tag that means the...

2 minutes read.

Most Commonly used Tags in HTML

In this tutorial, we'll look at the most popular HTML tags. We know HTML is a fundamental requirement for creating a website. As a result, it is essential to remember...

9 minutes read.

HTML <table> tag

The Table element If we want to show the data and information in a two-dimensional table with rows and columns, then we can achieve this by using the HTML element <table>. Syntax: <body> <table> <thead> <tr> <thcolspan="#">………….</th> </tr> </thead> <tbody> <tr> <td>……….</td> <td>……….</td> </tr> </tbody> </table> </body> Example: <!DOCTYPE...

9 minutes read.

HTML Ordered List

We use <ol> tag to make an ordered list in html. An ordered list is made to make a list of items in ordered form, ordered list can be either...

3 minutes read.

HTML Frames

Frames in Html is used to divide the browser into different sections where each section can load different Html documents. Collection of frame is known as Frameset. Creating frames:We use frameset...

2 minutes read.

HTML <span> tag

The span tag in HTML is used as an inline container element to mark up a specific or special chunk of a text or a section of a page. If you...

2 minutes read.

How to insert spaces/tabs in text using HTML/CSS

What is HTML? HTML or HyperText Markup Language is used to design web pages. It was released in 1993. The file extension name for HTML file is “.html”. An HTML file...

4 minutes read.

HTML Hide Element

The HTML hide element is used to hide the element. We place the hidden attribute inside those elements which we want to hide. The hidden attribute is a Boolean attribute. The...

3 minutes read.

HTML <sup> Tag

The HTML sup element is used to describe one or more superscript contents. The sup tag shows a text which is presented above the regular line and half the length...

2 minutes read.

HTML <u> tag

Underline Element/Tag: The u tag in html is used to specify the important text or phrase by underline. In earlier HTML versions, this element was known as the "Underline" element, and...

5 minutes read.

What does HTML stand for?

HTML stands for Hyper Text Markup Language. We use this markup language to design a web page. Web browsers use this language to showcase text, videos, images, audio and other...

6 minutes read.

HTML Form Action

The <form> tag has an attribute named action that contains a URL. The HTML action attribute defines the webpage URL on which you want to send the data after submitting...

4 minutes read.

HTML Search Box

The HTML search box is also known as the search bar. It is an input text field that is used to search the content. If the users want to explore...

7 minutes read.

CSS Clearfix

CSS Clearfix: A clearfix (or clear float) in CSS is for a component to clear or fix the child component, so we don’t need to insert additional markup. The clear...

4 minutes read.

Html &lt;center> Tag

The term HTML refers to Hyper Text Markup Language. The most widely used markup language for making web pages is HTML. A structure of web page is described in HTML....

3 minutes read.

HTML5 Tags

HTML5 Tags A list of newly included tags is provided in HTML5. These HTML 5 tags (elements) provide a better structure for the document. This list shows description of all HTML...

3 minutes read.

How to insert image in HTML

An image (technically digital image) in HTML or even in general technical aspects is a binary representation of visual information. By visual information we mean, in the form of drawings/pictures,...

5 minutes read.

HTML Anchor

HTML Anchor The HTML anchor tags define a hyperlink that links to other pages on one page. It can create hyperlinks to any web page and files, locations or any other...

3 minutes read.

How to change text color in HTML

Changing the text colour of a web page is essential because it enhances readability. There are several ways to change the colour of the text in HTML, which are as follows: Text...

7 minutes read.