如何编写 HTML 代码以将正常段落放在单独的框架中

问题描述 投票:0回答:1

我想在html中为以下内容编写代码。第一句话在一个框架中,并保留在另一个框架中。

Welcome to Steeloncall Your premier online marketplace for all things steel! We pride ourselves on offering a comprehensive range of top-quality steel products, tailored to meet your diverse needs. From [TMT Bars](https://steeloncall.com/tmt-bars) and MS Sheets to MS Squares, MS Channels, MS Angles, MS Plates, MS Flats, MS Rounds, Beams, and Binding Wire, we have everything you need to complete your projects with strength and precision.

html
1个回答
0
投票

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Steeloncall</title>
</head>
<body>

<!-- Frame 1 -->
<div style="border: 1px solid black; padding: 10px;">
  <p>Welcome to Steeloncall</p>
</div>

<!-- Frame 2 -->
<div style="border: 1px solid black; padding: 10px;">
  <p>Your premier online marketplace for all things steel! We pride ourselves on offering a comprehensive range of top-quality steel products, tailored to meet your diverse needs. From <a href="https://steeloncall.com/tmt-bars">TMT Bars</a> and MS Sheets to MS Squares, MS Channels, MS Angles, MS Plates, MS Flats, MS Rounds, Beams, and Binding Wire, we have everything you need to complete your projects with strength and precision.</p>
</div>

</body>
</html>

使用两个元素来创建两个框架。 每个都有一个 border 属性,用于在框架周围创建边框,并通过填充来添加框架内的空间。 第一个包含第一句话“Welcome to Steeloncall”。 第二个包含剩余内容,包括超链接。 该超链接是使用带有 href 属性的标签创建的,链接到 Steeloncall 网站上的 TMT Bars 页面。 您可以根据需要调整边框、内边距和其他 CSS 属性来自定义框架的外观。

© www.soinside.com 2019 - 2024. All rights reserved.