Header Ads Widget

HTML CSS technical documentation page

 This post will describe about how to create responsive technical documentation web page using only HTML and CSS.

Before creating this mini project I will explain you about what the technical documentation is.

What is technical documentation?

Technical documentation is a short description about the product so user can learn how to use it. Example of technical documentation includes user manual, Wiki, tutorials, etc..

Skills required for project:-

HTML and CSS

Description:-

The technical documentation page is simple page with menu bar and content part. The menu bar is consists of links of topics so user can directly jump to respective topic. In this mini project I will creating technical documentation of HTML.

 HTML structure:-

The structure of page has been created using version 5 of HTML. The main heading has been defined under header element. I have taken two sections: one for navigation menu and second for content. The content has been written inside article elements. The “<pre>” and “<code>” element has been used to display html example as it is.

CSS design:-

The width of main heading has been 100% and sticked at top. The navigation menu positioned left and the content area positioned right using float property.

HTML CSS technical documentation page
HTML CSS technical documentation page (output image on laptop)


responsive technical documentation page using media query :-

To make page mobile friendly I have taken media query so that this page also look good on small devices.

All the content of this page positioned to left. The navigation menu has been hidden, when you hover on menu the navigation links displayed. The font size also has been decreased.

HTML source code:-


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head>
<title>Technical Documentation</title>
<link rel="stylesheet" href="tech_doc.css">
</head>
<body>
<header>
<h1>HTML Documentation</h1>
</header>
<section id="sec1">
<h2>Menu</h2>
<nav>
<a href="#intro">Introduction</a>
<a href="#elem">Elements and attributes</a>
<a href="#heads">Headings and paragraph</a>
<a href="#format">HTML foramtting</a>
<a href="#list">HTML lists</a>
<a href="#image">HTML image and link</a>
<a href="#inline">Inline and BLock elements</a>
<a href="#table">HTML table</a>
<a href="#form">HTML forms</a>
</nav>
</section>
<section id="sec2">
<article>
<a name="intro">&nbsp;
<h3>INTRODUCTION</h3>
<a name="intro">
<h5>What is HTML?</h5>
<p>Tim Berners-Lee invented HTML in 1991. After that new versions were introduced in period of time.
HTML stands for Hyper Text Markup Language. As name suggest HTML is markup language used for web development. In web developement, HTML creates structure of Web pages.HTML is consists of elements(tags).</p>
<p>Following is the basic structure of HTML.</p>
<pre>
<code>
&lt;!DOCTYPE html&gt; &larr; HTML documentation version
&lt;html&gt; &larr; Root element
&lt;head&gt; &larr; Contains meta information.
&lt;title&gt; &larr; title of html page
&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
.....Rest of the elements written here.....
&lt;/body&gt;
&lt;/html&gt;
</code>
</pre>
</article>
<article>
<a name="elem">&nbsp;
<h3>Elements and attributes</h3>
</a>
<p>The HTML elements are defined by start tag,content and end tag. <br />examples of HTML elements:<br />&lt;h1&gt;Heading&lt;h1&gt;<br />&lt;p&gt;Paragrahph&lt;p&gt;.<br>HTML elements with no content are called empty elements. Examples of empty elements are:&lt;hr&gt;,&lt;br&gt;,&lt;img&gt;,etc.</p>
<p>The HTML attributes are defined by 'name=value' pair inside an element. The id and class are core attributes of html used to uniquely identify html element.<br> For example:- <code><br>&lt;a href="filepath"&gt;name&lt;/a&gt;<br>&lt;p id="p1"&gt; some content&lt;/p&gt;</code></p>
</article>
<article>
<a name="heads">&nbsp;
<h3>Headings and Paragraphs</h3>
</a>
<p>HTML have 6 levels of headings:&lt;h1&gt;,&lt;h2&gt;,&lt;h3&gt;,&lt;h4&gt;,&lt;h5&gt;,&lt;h6&gt;.The &lt;h1&gt; specifies the largest heading among 6.Similarly &lt;h6&gt; specifies smallest heading.</p>
<p>The &lt;p&gt; tag specifies the paragraph.Each paragraph starts with a new line.If you want to break the paragraph at middle and start the next sentence at new line then use &lt;br&gt; tag before the sentence which you want to start at new line.</p>
</article>
<article>
<a name="format">&nbsp;
<h3>HTML formatting</h3>
</a>
<p>The formatting elements are used to make simple text beutiful on browser window. following are the list of elements that are used to format text.</p
><p>
&lt;b&gt; :- Bold text <br>
&lt;strong&gt; :- Important text <br>
&lt;em&gt; :- Emphasized text <br>
&lt;mark&gt; :- Marked text <br>
&lt;small&gt; :- smaller text <br>
&lt;del&gt; :- Deleted text <br>
&lt;ins&gt; :- Inserted text <br>
&lt;sub&gt; :- Subscripted text <br>
&lt;sup&gt; :- Superscripted text
</p>
</article>
<article>
<a name="list">&nbsp;
<h3>HTML lists</h3>
</a>
<p>HTML list elements allow you listing your content in ordered or unordered lists. Another listing approach is description list which have little description about specified term.</p>
<p>&lt;ol&gt; :- Ordered list<br>Display list with series of either number,romans or alphabetic bullets.</p>
<p>&lt;ul&gt; :- Unordered list<br>Display list with series of either disc,circle or square bullets.</p>
<p>&lt;li&gt; :- List items<br>Container for items.</p>
<p>&lt;dl&gt; :- Definition list<br>Display list of terms with some description.</p>
<p>&lt;dt&gt; :- Definition term<br>Display list of term.</p>
<p>&lt;dd&gt; :- Term description<br>Display description about specified term.</p>
</article>
<article>
<a name="image">&nbsp;
<h3>HTML image and link</h3>
</a>
<p>Images can be insert in html document using &lt;img&gt; element. It is an empty element. It is necessary to write src attribute with image element, because without file path image is not displayed on screen. You can also set size of images with height and width atrribute. Always use alt attribute that provide description of image. In case an image not loaded the text in alt is displayed inplace of image. <br>Example :-<br><code> &lt;img src="imagefilepath" alt="description" height="300" width="400"/&gt;</code></p>
<p>An anchor tag is used to put links on text or images. Using anchor tag you can link another page or link the content of same page. <br> Example:-<br> <code>&lt;a href="filepath"&gt;some text/image&lt;/a&gt;<br>&lt;a&gt;href="#text"&gt;text link&lt;/a&gt;<br>&lt;a name="text"&gt;some text&lt;/a&gt;</code></p>
</article>
<article>
<a name="inline">&nbsp;
<h3>Inline and Block Elements</h3>
</a>
<p>Inline elements are the elements that never starts at new line and takes only required width. Some inline elements are:<code>&lt;a&gt;,&lt;br&gt;,&lt;input&gt;,&lt;strong&gt;,&lt;q&gt;,&lt;sup&gt;,&lt;b&gt;,&lt;span&gt;,&lt;img&gt; </code>and more.</p>
<p>Block elements are opposite to inline elements, takes full width and start at new line.The browser also adds margins before and after elements.Examples of block level elements are:<code>&lt;p&gt;,&lt;div&gt;,&lt;address&gt;,&lt;article&gt;,&lt;ol&gt;,&lt;section&gt;&lt;hr&gt;,&lt;nav&gt;</code> and more.</p>
<pre>
Example:-
<code>
&lt;p&gt;This is an example of &lt;b&gt;block&lt;/b&gt; <br>and &lt;span&gt;inline&lt;/span&gt; elements.&lt;/p&gt;
</code>
</pre>
<p>An inline element can not contain block elements but block elements contains inline elements.</p>
</article>
<article>
<a name="table">&nbsp;
<h3>HTML table</h3>
</a>
<p>HTML also display data in tabular form.The &lt;table&gt; element is arrange data in row and column format. Following are the list of table elements.</p>
<p>
&lt;table&gt; :- define table <br>
&lt;tr&gt; :- define table row <br>
&lt;td&gt; :- define table cell <br>
&lt;th&gt; :- define heading cell <br>
&lt;caption&gt; :- define table caption <br>
&lt;thead&gt; :- define table header <br>
&lt;tbody&gt; :- define table body <br>
&lt;tfoot&gt; :- define table footer <br>
&lt;colgroup&gt; :- define column group <br>
</p>
</article>
<article>
<a name="form">&nbsp;
<h3>HTML forms</h3>
</a>
<p>HTML form is used to get input from user and sent to server. The &lt;form&gt; element is used to create html form.It contains other input elements such as:text fields,checkboxes,radio buttons,submit button,drop-down menu,etc..In form craetion most of the times an &lt;input&gt; element is used.It has type attribute, which specifies different form of inputs.The &lt;form&gt; element used attributes like:name,target,method,action.<br>Example:-<br> 
<pre>
<code>
&lt;form name="f1" method="post" action="url"&gt;
&lt;input type="text" name="nm"&gt;
&lt;input type="submit" name="submit" value="submit"&gt;
&lt;/form&gt;
</code>
</pre>
</p>
</article>
</section>
</body>
</html>

CSS styles sheet:-

*
{
font-family:"Times New Roman", Times, serif;
}
header h1
{
position:fixed;
top:0;
margin:auto;
width:98%;
background-color:#CCCCCC;
color:#0033FF;
text-align:center;
border:3px solid #999999;
}
#sec1
{
margin-top:30px;
margin-left:20px;
position:fixed;
width:20%;
height:100%;
display:inline-block;
padding:10px;
}
h2
{
text-align:center;
background-color:#000000;
color:#FFFFFF;
padding:5px;
}
nav a
{
display:block;
padding:5px;
text-decoration:none;
font-size:18px;
text-align:justify;
color:#000000;
border-bottom:1px inset #CCCCCC;
}
nav a:hover
{
border:3px inset #999999;
font-size:20px;
}
a:active
{
background-color:#CCCCCC;
}
#sec2 
{
margin-top:20px;
margin-right:30px;
float:right;
width:70%;
text-align:justify;
}
h3
{
background:#000000;
color:#FFFFFF;
padding:5px;
}
p
{
font-size:18px;
}
/*media query for mobile phones*/
@media only screen and (max-width:600px)
{
 header h1{
           left:0;
		   right:0;
		   width:auto;
		   text-align:left;
          }
 #sec1{
       width:100%;
	   height:auto;
	   margin-top:35px;
	   margin-left:-10px;
	   margin-right:0;
	   background-color:#0000FF;
      }		    
 h2{
    padding:0;
    text-align:left;
	}	
 nav a{
      display:none;
	  }
 #sec1:hover nav a{
      display:block;
      }	    
 #sec2 {
      margin-top:100px;
      float:left;
      }	 	   
  p{
    font-size:16px;
   }   
}

Output on laptop:-




Output on mobile phone:-



So here the project of making technical documentation of HTML completed.

Summary

This is simple and beginners friendly mini project. In html less than (“<”) and greater than (“>”) sign not display on screen because the browser confused between HTML tags and less than and greater than sign. So to display html example on screen as it is I have used html character entity &lt; for less than and &gt; for greater than sign.


Post a Comment

0 Comments