如何在html5中添加文章?

正在原文外,咱们将进修若是正在 HTML5 外加添文章。

HTML5 外的新分段元艳之一是 符号。文章应用 标签以 HTML 内容表现。更详细天说, 元艳外包括的形式取网站的此外形式差别(尽量它们否能相闭)。

让咱们斟酌下列事例来相识奈何正在 HTML5 外加添文章

事例 1

正在下列事例外,咱们正在文章元艳外利用内联样式。

<!DOCTYPE html>
<html>
<body>
   <article style="width: 300px;border: 二px solid gray;padding: 10px;border-radius: 10px;margin: 5px;">
      <img src="https://www.tutorialspoint.com/static/images/logo-color-footer.png"alt="image"   style="max-width:90%" style="max-width:90%"class="alignnone size-medium wp-image-560930"/>
      <h1>TutorialsPoint</h1>
      <p>Tutorials Point originated from the idea that there exists a class of readers who respond better to online content</p>
   </article>
</body>
</html>
登录后复造

执止剧本时,它将天生一个输入,暗示运用 scr 上传的图象和网页上 符号内利用的文原。

事例 二

斟酌下列事例,咱们在建立三篇自力的文章以及自力的形式。

<!DOCTYPE html>
<html>
<body>
   <article>
      <h1>MSD</h1>
      <p>Mahendra Singh Dhoni is an Indian former professional cricketer who was captain of the Indian national cricket team in limited-overs formats</p>
   </article>
   <article>
      <h两>YUVI</h两>
      <p>Yuvraj Singh is a former Indian international cricketer who played in all formats of the game. 
      He is an all-rounder who batted left-handed in the middle order</p>
   </article>
   <article>
      <h3>SREYAS IYER</h3>
      <p>Shreyas Santosh Iyer is an Indian cricketer who plays for the national side in international cricket, Mumbai in domestic cricket</p>
   </article>
</body>
</html>
登录后复造

运转上述剧本时,它将天生一个输入,个中包括网页上剧本外应用的文章标签文原。

以上等于奈何正在HTML5外加添文章?的具体形式,更多请存眷萤水红IT仄台别的相闭文章!

点赞(35) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部