SKPTRICKS - Programmer Hub

Friday, February 16, 2018

HTML5 Layout Design From Scratch including header, article, footer tag etc.




Check out the below mostly used semantic elements and their purpose :
  • <header> - Defines a header for a document or a section
  • <nav> - Defines a container for navigation links
  • <section> - Defines a section in a document
  • <article> - Defines an independent self-contained article
  • <aside> - Defines content aside from the content (like a sidebar)
  • <footer> - Defines a footer for a document or a section
  • <details> - Defines additional details
  • <summary> - Defines a heading for the <details> element
Here we have designed simple example using HTML5 semantic elements and also it includes basic header and footer design. Refer the below diagram that help you to build more understanding on HTML5 template design.

header and footer in html5 example

Lets see the complete example to build more understanding on HTML5 Template Design :

HTML 5 Layout Design.html
check out HTML5 template source code.
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>HTML5 Template Design</title>
    <meta content='HTML5 Template Design' name='description' />
    <meta content='width=device-width, initial-scale=1' name='viewport' />
    <link rel="stylesheet" href="style.css" />
</head>

<body>
   
    <div id="main-container">
        <header id="header">
            <section> Skptricks </section>

            <nav>
                <ul>
                    <li><a href="http://www.skptricks.com/p/php.html">PHP</a>
                    </li>
                    <li><a href="http://www.skptricks.com/search/label/java">JAVA</a>
                    </li>
                    <li><a href="http://www.skptricks.com/search/label/jquery">Jquery</a>
                    </li>
                    <li><a href="http://www.skptricks.com/search/label/AJAX">AJAX</a>
                    </li>
                    <li><a href="http://www.skptricks.com/search/label/android">Android</a>
                    </li>
                </ul>
            </nav>
        </header>

        <section id="display-ads">
            <h1><center> Display Ads </center> </h1>
        </section>

        <section id="main-body-container">

            <article id="main-article">
                <h1> Article Box </h1>
                <section> You can write or mention your article description here </section>
            </article>

            <aside id='sidebar'>
                <h1> Slider Box </h1>
                <section> You can write or mention your Slider description here </section>
            </aside>

        </section>

        <footer id="footer">Copyright © <a shref="http://www.skptricks.com">www.skptricks.com </a>
        </footer>
    </div>

</body>

</html>

style.css
Styleheet design for above HTML5 template.
* {
     margin: 0px;
     padding: 0px 
}
 #main-container {
     width: 100%;
     margin: 0px auto;
}
 #header {
     width: 100%;
     background-color: black;
     padding: 10px;
     color: white;
}
 #header:after {
     content: ".";
     display: block;
     height: 0;
     clear: both;
     visibility: hidden;
}
 #header section {
     float: left;
     width: 20%;
     font-size: 18px;
     font-weight: bold;
}
 #header nav {
     width: 50%;
     float: left;
}
 #header nav ul {
     list-style: none;
}
 #header nav ul li {
     float: left;
     min-width: 10%;
     padding: 4px;
     margin-left: 10px;
     background-color: #fdf1e5;
     text-align: center;
     color: black;
}
 #header nav ul li a, a {
     text-decoration: none;
}
 #main-body-container {
     padding: 10px;
     margin: 10px;
  }
 #main-body-container:after {
     content: ".";
     display: block;
     height: 0;
     clear: both;
     visibility: hidden;
}
 #display-ads{
     padding: 20px;
     margin: 20px;
     background: #e5e5e5;
}
 #main-article {
     float: left;
     width: 60%;
     min-height: 450px;
     background: #e5e5e5;
}
 #sidebar {
     float: right;
     width: 38%;
     min-height: 450px;
     background: #e5e5e5;
}
 #footer {
     width: 100%;
     background-color: black;
     padding: 10px;
     color: white;
}

Output:
This all about design of HTML5 template including header and footer design. Thank you for reading this article, and if you have any problem, have a another better useful solution about this article, please write message in the comment section.

Download code:
https://github.com/skptricks/php-Tutorials/tree/master/HTML5%20Layout%20Design%20From%20Scratch%20including%20header-%20article-%20footer%20tag%20etc.

Demo Link:
https://skptricks.github.io/learncoding/html5-template-design/HTML%205%20Layout%20Design.html


No comments:

Post a Comment

Newer Post Older Post Home

资讯网jssetinterval柘城双眼皮女孩起名字袁姓斗破苍穹前传之药老传奇仓库管理软件破解版虎年起名大全男孩名字经纬度定位查询的网站平面设计楚楚动人是什么意思酒店名字起名大全对比大网站建设公司周公解梦吃人网站商标的设计格尔木企业网站建设长沙seo论坛优秀网站设计站点凯起名男孩名字seo在线培训分首选金手指四徐起什么名字好周易第十六卦房地产公司起名付费seo推广华字怎么起名绿色农产品起名绿色科技网站建设seo关键词灰色按笔画起名子nba未解之谜情侣店铺怎么起名公司网站设计哪家公司好少年生前被连续抽血16次?多部门介入两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”淀粉肠小王子日销售额涨超10倍高中生被打伤下体休学 邯郸通报单亲妈妈陷入热恋 14岁儿子报警何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言张家界的山上“长”满了韩国人?男孩8年未见母亲被告知被遗忘中国拥有亿元资产的家庭达13.3万户19岁小伙救下5人后溺亡 多方发声315晚会后胖东来又人满为患了张立群任西安交通大学校长“重生之我在北大当嫡校长”男子被猫抓伤后确诊“猫抓病”测试车高速逃费 小米:已补缴周杰伦一审败诉网易网友洛杉矶偶遇贾玲今日春分倪萍分享减重40斤方法七年后宇文玥被薅头发捞上岸许家印被限制高消费萧美琴窜访捷克 外交部回应联合利华开始重组专访95后高颜值猪保姆胖东来员工每周单休无小长假男子被流浪猫绊倒 投喂者赔24万小米汽车超级工厂正式揭幕黑马情侣提车了西双版纳热带植物园回应蜉蝣大爆发当地回应沈阳致3死车祸车主疑毒驾恒大被罚41.75亿到底怎么缴妈妈回应孩子在校撞护栏坠楼外国人感慨凌晨的中国很安全杨倩无缘巴黎奥运校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变王树国卸任西安交大校长 师生送别手机成瘾是影响睡眠质量重要因素国产伟哥去年销售近13亿阿根廷将发行1万与2万面值的纸币兔狲“狲大娘”因病死亡遭遇山火的松茸之乡“开封王婆”爆火:促成四五十对奥巴马现身唐宁街 黑色着装引猜测考生莫言也上北大硕士复试名单了德国打算提及普京时仅用姓名天水麻辣烫把捣辣椒大爷累坏了

资讯网 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化