Web page creation using two-column layout with CSS
Program plan:
Include the HTML tag “<HTML>”.
- Include the title on the webpage using “<head>” tag.
- Include the title on the webpage using “<title>” tag.
- Include the style tag using “<style>” for internal style.
- Add the style for “body” element.
- Add the style for “wrapper” element.
- Add the style for “nav” element.
- Add the style for “nav ul” element.
- Add the style for “nav a” element.
- Add the style for “main” element.
- Add the style for “header” element.
- Add the style for “h1” element.
- Add the style for “h2” element.
- Add the style for “article” element.
- Add the style for “footer” element.
- Open the body of the web page using “<body>” tag.
- Use the two-column layout to design the webpage using “div” tag.
- Open the header of the web page using “<header>” tag.
- Open the navigation link using “<nav>” tag.
- Open the main of the web page using “<main>” tag.
- Open the section of the web page using “<section>” tag.
- Open the article of the web page using “<article>” tag.
- Open the footer of the web page using “<footer>” tag.
- Close all the tags.
The HTML code creates a webpage regarding the hobby using two-column layout with CSS.
Explanation of Solution
Program:
Filename: “index.html”
<!-- html opening tag -->
<html>
<!-- head opening tag -->
<head>
<!-- Title opening tag -->
<title>Hobbies</title>
<!--Style Tag-->
<style>
/*Internal style for body tag*/
body
{
font-family:Verdana, Arial, sans-serif;
background-color: #00005D;
}
/*Internal style for wrapper tag*/
#wrapper
{
background-color: #b3c7e6;
color: #000066;
width: 80%;
margin: auto;
min-width: 960px;
max-width: 1200px;
}
/*Internal style for navigation tag*/
nav
{
float: left;
width: 150px;
}
/*Internal style for navigation in "ul" tag*/
nav ul
{
list-style-type: none;
margin-left: 0;
padding: 10px;
}
/*Internal style for navigation in "a" tag*/
nav a
{
text-decoration: none;
padding: 10px;
font-weight: bold;
}
/*Internal style for normal navigation link*/
nav a:link { color: #ffffff; }
/*Internal style for link when user has visited*/
nav a:visited { color: #eaeaea; }
/*Internal style for link when mouses over it*/
nav a:hover { color: #000066; }
/*Internal style for main tag*/
main
{
display: -moz-inline-box;
margin-left: 155px;
padding: 20px;
background-color: #ffffff;
color: #000000;
}
/*Internal style for header tag*/
header
{
background-color: #869dc7;
color: #00005D;
font-size: 150%;
padding: 10px 10px 10px 155px;
background-image: url(hobbies.jpg);
background-repeat: no-repeat;
height: 130px;
}
/*Internal style for h1 tag*/
h1 {margin-bottom: 0;}
/*Internal style for h2 tag*/
h2
{
color: #869dc7;
font-family: arial, sans-serif;
font-size: 200%;
}
/*Internal style for article tag*/
article header
{
background-color: #FFFFFF;
background-image: none;
padding-left: 0;
font-size: 90%;
height: auto;
}
/*Internal style for footer tag*/
footer
{
font-size:70%;
text-align: center;
clear: right;
background-color: #869dc7;
padding: 20px;
}
<!--close the style tag-->
</style>
<!--Close tag-->
</head>
<!-- Open the body tag-->
<body>
<!--open the div tag-->
<div id="hobby">
<!--Open the header tag-->
<header>
<!--Display the h1 heading-->
<h1>Favorite hobby: Reading Books</h1>
<!--Close the header tag-->
</header>
<!--Open the navigation tag-->
<nav>
<!--Open the unordered list tag-->
<ul>
<!--Display the navigation link using "a" tag-->
<li><a href="index.html">Home</a></li>
<!--Close the unordered list tag-->
</ul>
<!--Close the navigation tag-->
</nav>
<!--Open the main tag-->
<main>
<!--Display the h2 heading-->
<h2>Description</h2>
<!--Open the section tag-->
<section>
<!--Open the article tag-->
<article>
<!--Display the content using header tag-->
<header><h1>Benifits</h1></header>
<!--Display date and time using time tag-->
<time datetime="2019-06-20">June 20, 2019</time>
<!--Display the content using paragraph tag-->
<p>Everything you read fills your head with new bits of information, and you never know when it might come in handy.</p>
<p>The more knowledge you have, the better equipped you are to tackle any challenge you will ever face.</p>
<!--Close the article tag-->
</article>
<!--Close the section tag-->
</section>
<!--Close the main tag-->
</main>
<!--Open the footer tag-->
<footer>Copyright 1999-2021.All Rights Reserved.
<!--Close the footer tag-->
</footer>
<!--Close the div tag-->
</div>
<!--Close the body tag-->
</body>
<!--Open the html tag-->
</html>
Output:
Screenshot of the Webpage
Want to see more full solutions like this?
Chapter 7 Solutions
Basics of Web Design: Html5 & Css3
- You can choose any topic to develop a front-end of a website using HTML, CSS, JavaScript (no framework is allowed)Instructions to design your front-end :i) A Registration and a Login form with JavaScript Validationii) Drop-down Navigation Bariii) Home Page should have - (header, Navigation bar, body with a side bar, footer)iv) You have to design minimum 5 Pages without Home, Registration and Login Pagearrow_forwardAndroid Studio Java Create a detailed plan to implement the app and submit this file The plan should include at least App Feature Description (graph if needed) Tech Difficulty Solution to Each Difficulty in Detail (tutorial/image if needed) Version of Approach 2. Layout of a simplified version Create an android app and do layout only Climacons.ttf for weather condition icons Fixed weather values, no function As close as possible Ignore the page indicators (4 dots) at the bottom Layout should look properly on different screens Submit .xml file and screenshotarrow_forwardCSSarrow_forward
- When developing a webpage it is NOT recommended to Use images Use “click here" links Use columns with different width Use wireframearrow_forwardThree buttons on the webpage at the bottom, I want each button to change the background color for the header at the top when the user clicks the button. Choose an appropriate color. ONLY USING JAVASCRIPTarrow_forwardIf you want text to appear to the left of the selected image control on a Web form, you would need to click which button in thePosition dialog box? Visual basics question help please.arrow_forward
- HTML Last lab, you created a webpage about someone you admire. Now we are going to add some styling to the webpage. You must apply descriptors (css rule) to the following selectors (any tags you do not currently have need to be added): body h1,h2,h3,h4,h5,h6,h7 (use at least 2) p ul li img You must use all of the following descriptors below in your page. Although you are not being graded on your design ability, do your best to make the style your own. Text Descriptors color font-size font-weight text-align Background background-color border Size width height margin You may add any additional styling or layout descriptors you like. Layout is a complicated topic in CSS and the lab does not require any specific layout, but here is a good explanation if you want to alter the layout anyway: https://learnlayout.com/arrow_forwardIn html and CSS Create a regular expression that will check whether either 4 words are contained inside a string.arrow_forwardCSSarrow_forward
- web development: Create a full HTML page according to the following requirements: Set the web page background color to rgb(150,150,250). Add background image to the page; you can download image. Do not repeat the background image. Set the background image position to top right. Insert the largest heading with the text "Fun Park”. Set the heading background color to white. Add opacity value 0.6 to the heading.arrow_forwardCreate below layout using HTML and CSS grids Holy Grail Layout Nav Main Content Sidebar Footerarrow_forwardHTML PROJECTarrow_forward
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT