Horje

Example 2 of HTML <article> Element

Use CSS to style the <article> element:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
.all-browsers {
  margin: 0;
  padding: 5px;
  background-color: lightgray;
}

.all-browsers > h1, .browser {
  margin: 10px;
  padding: 5px;
}

.browser {
  background: white;
}

.browser > h2, p {
  margin: 4px;
  font-size: 90%;
}
</style>
</head>
<body>

<article class="all-browsers">
  <h1>Most Popular Browsers</h1>
  <article class="browser">
    <h2>Google Chrome</h2>
    <p>Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world's most popular web browser today!</p>
  </article>
  <article class="browser">
    <h2>Mozilla Firefox</h2>
    <p>Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.</p>
  </article>
  <article class="browser">
    <h2>Microsoft Edge</h2>
    <p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge replaced Internet Explorer.</p>
  </article>
</article>

</body>
</html>

Output should be:

Example 2 of HTML <article> Element



Related Articles
What is HTML Semantic HTML Semantic
What is Semantic Elements in HTML HTML Semantic
How to create HTML <section> Element HTML Semantic
How to create HTML <article> Element HTML Semantic
What is Nesting <article> in <section> or Vice Versa HTML Semantic
How to create HTML <header> Element HTML Semantic
How to create HTML <footer> Element HTML Semantic
How to create HTML <nav> Element HTML Semantic
How to create HTML <aside> Element HTML Semantic
How to create HTML <figure> and <figcaption> Elements HTML Semantic
Why Semantic Elements? HTML Semantic

Single Articles
Hoow is to look HTML autofocus AttributeHTML Semantic
Full Code Example of HTML autofocus AttributeHTML Semantic

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Semantic
Uploaded by:
Admin



Share on: