这里有什么问题?我必须为codeacademy练习提供id。
</head>
<body>
<div class="header">
<h1
id="head-text">
</h1>
<div > <!--Add an id to this div -->
<h1> Travel Like Never Before</h1>
<h2>Whether you're looking for adventure or luxury, let us help you
plan your perfect getaway.</h2>
</div>
答案 0 :(得分:1)
请遵循此代码
<div id="div_custom" > <!-- -->
<h1> Travel Like Never Before</h1>
<h2>Whether you're looking for adventure or luxury, let us help you
plan your perfect getaway.</h2>
</div>
确保该ID在页面中是唯一的。
答案 1 :(得分:0)
您可以按如下所示添加它。
<div id="container"> <!--Add an id to this div -->
<h1> Travel Like Never Before</h1>
<h2>Whether you're looking for adventure or luxury, let us help you
plan your perfect getaway.</h2>
</div>