[HTML] 코드아카데미 문제풀이 "Build a Website: HTML" (8/9)
Wrap with a div
1. 문제 원문링크
As before, let's group all three pieces of supporting content with divs, like this:
<div class="learn-more">
<div class="container">
<div>
<h3>Travel</h3>
...
</div>
<div>
<h3>Host</h3>
...
</div>
<div>
<h3>Trust and Safety</h3>
...
</div>
</div>
</div>
Instructions
Wrap all pieces of supporting content with two divs, like in the example above. Give the outer div a class="learn-more"
and the inner div a class="container"
.
2. 풀이
h3, p, 링크를 포함한 p를 가지는 3개의 div를 <div class="learn-more">와 <div class="container"> 아래 종속 시킵니다.
3. 해답
다음과 같이 입력하면 통과합니다.
<!DOCTYPE html>
<html>
<body>
<div class="learn-more">
<div class="container">
<html>
<body>
<div class="learn-more">
<div class="container">
<div>
<h3>Travel</h3>
<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
<p> <a href="#">See how to travel on Airbnb</a></p>
<h3>Travel</h3>
<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
<p> <a href="#">See how to travel on Airbnb</a></p>
<ul>
<li>Sign Up</li>
<li>Log In</li>
<li>Help</li>
</ul>
<ul>
<li>Sign Up</li>
<li>Log In</li>
<li>Help</li>
</ul>
</div>
<div>
<h3>Host</h3>
<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
<p><a href="#">Learn more about hosting</a></p>
</div>
<div>
<h3>Trust and Safety</h3>
<p>From VErified ID to our worldwide customer support team, we've got your back.</p>
<p><a href="#">LLearn about trust at Airbnb</a></p>
</div>
</div>
</div>
</body>
</html>
<li>Sign Up</li>
<li>Log In</li>
<li>Help</li>
</ul>
<ul>
<li>Sign Up</li>
<li>Log In</li>
<li>Help</li>
</ul>
</div>
<div>
<h3>Host</h3>
<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
<p><a href="#">Learn more about hosting</a></p>
</div>
<div>
<h3>Trust and Safety</h3>
<p>From VErified ID to our worldwide customer support team, we've got your back.</p>
<p><a href="#">LLearn about trust at Airbnb</a></p>
</div>
</div>
</div>
</body>
</html>
반응형