Open your text editor: Please complete this code in HTML   create a new file and name it “Lec_Ex4_2.html”  create a new file and name it “style_2.css”  Type the 8 lines in the html(basic html structure).  Add this line to the head section of html:     Write these lines in the body of the html:  Your name  .  Style it in the CSS:  #title{ background-color:blue;}  #container1 {background-color:red;}   If we don’t specify the width of the div element, it will take up the full width available.  We can specify the width and height of the div using percentages or pixels.  Percentages are flexible (changes according to the screen size), and pixels are fixed.  Add the following property to both divs:  Width:80%;  This is comparing to the full screen  For the title div:  Padding:2%;  For the container div:  Height: 400px;  Height can also be made with percentages, but pixels are preferred.  Your code must have 3 divs : title, container1 and container2 (the one inside the red div).  Container2 must be inside container1.  All the divs must be centered, colorful, and not fill up the full space that is given to them.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Open your text editor: Please complete this code in HTML 

 create a new file and name it “Lec_Ex4_2.html”

 create a new file and name it “style_2.css”

 Type the 8 lines in the html(basic html structure).

 Add this line to the head section of html: 

 

 Write these lines in the body of the html: 

<div id=“title”><h1>Your name</h1></div>
 <div id=“container1”> . </div>
 Style it in the CSS:
 #title{ background-color:blue;}
 #container1 {background-color:red;}

 

If we don’t specify the width of the div element,
it will take up the full width available.
 We can specify the width and height of the div
using percentages or pixels.
 Percentages are flexible (changes according to
the screen size), and pixels are fixed.
 Add the following property to both divs:
 Width:80%;
 This is comparing to the full screen

 For the title div:
 Padding:2%;
 For the container div:
 Height: 400px;
 Height can also be made with percentages, but
pixels are preferred.

 Your code must have 3 divs : title, container1
and container2 (the one inside the red div).
 Container2 must be inside container1.
 All the divs must be centered, colorful, and not
fill up the full space that is given to them. 

 

On your own:
Build another
centered div
inside the red div.-
div3
Div 1
Div2
80
100
Transcribed Image Text:On your own: Build another centered div inside the red div.- div3 Div 1 Div2 80 100
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Image Element
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education