The Sections of a Webpage Introduction to Sections A section is an area you want to delimit in a web page, for any reason. Most of the time, you create a section because you want to put some items in a group. As mentioned for div and span, the sections of a webpage are created in HTML but, in most cases, HTML doesn't know what to do with them. Here is how it works. Sections are created as HTML elements but they are configured in CSS. An HTML Section In HTML, a section is created using a tag named section. Between its start and end tags, you can put anything you want: paragraphs of text, tables, lists, etc. Only you will decide why you need a section and what you want to do with it. Here is an example: <html> <head> <title>F# Programming: An Overview</title> <style> .aRecord { font-size: 12pt } .formattedRecord { font-family: Courier; color: blue; } .fsharpClass { font-family: Georgia } </style> </head> <body> <h1>F#: Object-Oriented Programming</h1> <p>The F# language supports different types and, subsequenly, there are various means to get an object. The types in F# include records, structures, classes, and discriminated unions.</p> <div class="aRecord"> <p>As done in <span style="font-family: Verdana; color: maroon">Object Pascal</span>, the record is the simplest technique to create a class. Here is an example of a record:</p> <pre class="formattedRecord">type Employee = { EmployeeNumber : string FirstName : string LastName : string HourlySalary : float }<pre> </div> <section class="fsharpClass"> <p>In all modern programming languages, the class is the most popular tool to create objects. Like all types in F#, a class is created using the <b>type</b> keyword. The members of a class are primarily created from primitive data types (<b>string</b>, <b title="Integer">int</b>, <b>float</b>, etc). A member of a class can also be an enumeration type. Here is an example:</p> <pre>type OccupancyStatus = | Other = 0 | Available = 1 | Occupied = 2 | NeedsRepair = 3 type Apartment = { UnitNumber : string Bedrooms : int Bathrooms : float SecurityDeposit : int MonthlyRate : int Status : OccupancyStatus }</pre> </section> </body> </html> This would produce:
A Section Aside A section can also be created with a tag named aside. A section created as this tag is supposed to be related to the other contents of the same page. Here is an example: <html> <head> <title>Social Science Studies</title> <style> .main-title { text-align: center; font-weight: bold; color: Navy; font-size: 0.86cm; text-shadow: 0.08cm 0.08cm 0.10cm Blue; font-family: Bodoni MT Black, Georgia, Times New Roman, serif; } .sub-title { text-align: left; color: Blue; font-size: 0.64cm; font-family: Georgia, Times New Roman, serif; } .contributions { color: #CC0000; text-align: justify; word-break: keep-all; font-family: Georgia, Garamond, Times New Roman, serif; } </style> </head> <body> <p class="main-title">Social Science Studies</p> <p class="sub-title">Introduction</p> <p class="paragraph">Social sciences cover a wide range of studies that address all types of topics about human beings, their behaviors, their history, their societies, and their environments.</p> <p class="sub-title">Social Science Contributions</p> <aside class="contributions"> <p>Social sciences are not strictly confined to the above list. Studies in chemistry borrow concepts from sociology, anthropology, and economy. Mathematics and medicine, that are sometimes said not to be a science, regularly share theories with philosophy, psychology, or criminology.</p> </aside> <p class="sub-title">Recommendations</p> <p class="paragraph">If you are planning to study any of the scocial science topics, find a good school.</p> </body> </html> This would produce:
A Header Section To let you explicitly designate a section of a webpage as the top portion, you can refer to it as the header. To let you create a section for the header part, HTML provides a tag named header. Such a section can be made to hold the top portion of a webpage. Here is an example: <html>
<head>
<title>Social Science Studies</title>
<style>
.top-part {
font-weight: bold;
color: #933;
text-align: center;
font-size: 1.16cm;
text-shadow: 0.08cm 0.08cm 0.10cm #F0F;
font-family: Bodoni MT Black, Georgia, Times New Roman, serif;
}
.sub-title {
text-align: left;
color: Blue;
font-size: 0.64cm;
font-family: Georgia, Times New Roman, serif;
}
.paragraph {
text-align: justify;
word-break: keep-all;
color: Black;
font-family: Georgia, Garamond, Times New Roman, serif;
}
</style>
</head>
<body>
<header class="top-part">
<p>Social Science Studies</p>
</header>
<p class="sub-title">Introduction</p>
<p class="paragraph">Social sciences cover a wide range of studies that address all
types of topics about human beings, their behaviors, their history, their societies,
and their environments.</p>
<p class="sub-title">Social Science Contributions</p>
<aside>
<p class="paragraph">Social sciences are not strictly confined to the above list.
Studies in chemistry borrow concepts from sociology, anthropology, and economy.
Mathematics and medicine, that are sometimes said not to be a science,
regularly share theories with philosophy, psychology, or criminology.</p>
</aside>
<p class="sub-title">Recommendations</p>
<p class="paragraph">If you are planning to study any of the scocial science topics,
find a good school.</p>
</body>
</html>
This would produce:
A Footer Section The bottom part of a webpage can be referred to as footer. To specify a section for such a section, create an element named footer. The section can be made to contain such items as a copyright notice or a navigational menu. Here is an example: <html> <head> <title>Social Science Studies</title> <style> .main-title { font-weight: bold; color: Navy; text-align: center; font-size: 1.18cm; text-shadow: 0.08cm 0.08cm 0.10cm Blue; font-family: Bodoni MT Black, Georgia, Times New Roman, serif; } .sub-title { text-align: left; color: Blue; font-size: 0.64cm; font-family: Georgia, Times New Roman, serif; } .paragraph { color: Black; text-align: justify; word-break: keep-all; font-family: Georgia, Garamond, Times New Roman, serif; } .contributions { text-align: justify; word-break: keep-all; color: Black; font-family: Georgia, Garamond, Times New Roman, serif; } .bottom-part { color: #A00; font-weight: bold; text-align: center; } </style> </head> <body> <header> <p class="main-title">Social Science Studies</p> </header> <p class="sub-title">Introduction</p> <p class="paragraph">Social sciences cover a wide range of studies that address all types of topics about human beings, their behaviors, their history, their societies, and their environments. Regular social science areas include sociology, psychology, philosoply, linguistics, communication, history, geography, demography, ethnicity, anthropology, archaeology, political science, law, education, criminology, and economy, just to name a few. Some social science topics are grouped in categories, such as individual or crowd, where studies tend to address the same categorical isssues. Still, social sciences are highly interchangeable. Sometimes, differences are a matter of interpretations based on the particular area(s) being considered.</p> <p class="sub-title">Social Science Contributions</p> <aside class="contributions"> <p class="paragraph">Social sciences are not strictly confined to the above list. Studies in chemistry borrow concepts from sociology, anthropology, and economy. Mathematics and medicine, that are sometimes said not to be a science, regularly share theories with philosophy, psychology, or criminology. In the same way, it is practically impossible to study computer science, which includes computer languages and application programming, without referring to linguistics. As a conclusion, social sciences are not restricted to one area of study but contribute to various types of sciences, studies, and disciplines.</p> </aside> <p class="sub-title">Recommendations</p> <p class="paragraph">If you are planning to study any of the scocial science topics, find a good school.</p> <footer class="bottom-part"> <p>Schools | Majors | Minors</p> <p>Copyright © 2015</p> </footer> </body> </html> This would produce:
An Article An HTML article is a section that can be accessed, used, and managed independently from the rest of a web page. Examples of articles are: responses to webpages at the ends of news articles, reactions posted in a forum, etc. To create an HTML article section, add an element using a tag named article. When creating an article, it is suggested that its first child be a heading (h1 to h5) that identifies what the article is used for. An Address Section The address section is an area where you want to show the contact information. To create such a section, use a tag named address. |