How to Website HTML Data Markup ?
SEO Help and Tips
How to Website HTML Data Markup ?
<head>
<title>Your Page Title</title>
<meta charset="UTF-8">
<meta name="description" content="Description of your webpage">
<meta name="keywords" content="keyword1, keyword2, keyword3">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Your Website</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>About Us</h2>
<p>This is a paragraph about your website or company.</p>
</section>
<section>
<h2>Services</h2>
<ul>
<li>Service 1</li>
<li>Service 2</li>
<li>Service 3</li>
</ul>
</section>
</main>
<footer>
<p>© 2023 Your Website. All rights reserved.</p>
</footer>
</body>
- The <!DOCTYPE html> declaration specifies the document type as HTML5.
- The <html> element is the root element of the HTML document.
- The <head> section contains metadata about the webpage, such as the page title, character encoding, description, keywords, and CSS stylesheet link.
- The <body> section contains the visible content of the webpage.
- The <header> element represents the header section of the webpage, usually containing a logo, site title, and navigation menu.
- The <main> element represents the main content of the webpage.
- The <section> element is used to define different sections within the main content area.
- The <footer> element represents the footer section of the webpage, typically containing copyright information.
- Various heading elements (<h1>, <h2>) are used to define headings.
- <p> elements are used to define paragraphs.
- <ul> and <li> elements are used to create unordered lists.
- <a> elements are used to create links.
You can customize this markup by adding or removing sections, updating the content, or modifying the styling using CSS.
<head>
<title>Your Page Title</title>
<meta charset="UTF-8">
<meta name="description" content="Description of your webpage">
<meta name="keywords" content="keyword1, keyword2, keyword3">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Your Website</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>About Us</h2>
<p>This is a paragraph about your website or company.</p>
</section>
<section>
<h2>Services</h2>
<ul>
<li>Service 1</li>
<li>Service 2</li>
<li>Service 3</li>
</ul>
</section>
</main>
<footer>
<p>© 2023 Your Website. All rights reserved.</p>
</footer>
</body>
<style>
/* styles.css */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 10px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
main {
padding: 20px;
}
section {
margin-bottom: 20px;
}
h1, h2 {
color: #333;
}
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
</style>
- The body selector sets the font family, margin, padding, and background color for the entire document.
- The header selector styles the header section, setting the background color and text color, as well as adding padding.
- The nav ul and nav ul li selectors style the navigation menu by removing the default list styles, making the list items display inline, and adding some margin between them.
- The nav ul li a selector styles the links within the navigation menu by setting the text color and removing the underline.
- The main selector adds padding to the main content area.
- The section selector adds margin at the bottom of each section.
- The h1 and h2 selectors set the color for the heading elements.
- The footer selector styles the footer section, setting the background color, text color, padding, and center-aligning the text.
- You can customize these CSS rules according to your preferred styles by modifying the property values or adding additional selectors.
Comments
Post a Comment
Thanks for your Comments.