In: Computer Science
Topic: HTML Styling Elements - CSS3
Write some HTML code that includes three Semantic HTML tags. Describe the semantic meaning of each one you choose.
SAMPLE CODE :
<!DOCTYPE html>
<html>
<body>
<article>
<h1>What Is Lorem
Ipsum?</h1>
<p>Lorem Ipsum is simply
dummy text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy text ever since the 1500s
when an unknown printer took a galley of type and scrambled it to
make a type specimen book. It has survived not only five centuries,
but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s with the
release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.</p>
</article>
<figure>
<img src="Lighthouse.jpg"
>
<figcaption>Fig1. -
Lighthouse.</figcaption>
</figure>
<footer>
<p>Posted by: Deloit
Dexa</p>
<p>Contact information: <a
href="mailto:someone@example.com">
someone@example.com</a>.</p>
</footer>
</body>
</html>
EXPLANATION :
What are Semantic tags ?
Examples of non-semantic tags: <div> and <span> - Tells nothing about its content.
Examples of semantic tags: <article>, <figure>, and <footer> - Clearly defines its content.
<article> tag :
The <article> element specifies independent, self-contained content.
An article should make sense on its own, and it should be possible to read it independently from the rest of the web site.
Examples of where an <article> element can be used:
<figure> tag :
An image and a caption can be grouped together in a <figure> element.
The purpose of a caption is to add a visual explanation to an image.
<footer> tag :
The <footer> element specifies a footer for a document or section.
A <footer> element should contain information about its containing element.
A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc.
You may have several <footer> elements in one document.