/*Name : Maha hamad alsaqour and ID : 442304695*/ /*this style to all tags in all pages*/ body, h1, h2, h3, p, ul, li { margin: 0; padding: 0; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; line-height: 1.6; color: #333; background-color: #f7f7f7; } header { background-color: #1a1a1a; color: #fff; padding: 20px; text-align: center; } nav ul { list-style-type: none; margin: 0; padding: 0; } nav li { display: inline; margin-right: 20px; } nav a { text-decoration: none; color: #fff; font-weight: bold; } footer { background-color: #1a1a1a; color: #fff; text-align: center; padding: 17px; bottom: 0; width: 100%; } #home { padding: 40px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; text-align: center; } #home h2 { color: #333; font-size: 24px; margin-bottom: 20px; } #home img { border: 4px solid #1a1a1a; border-radius: 8px; max-width: 100%; height: auto; margin-top: 20px; } /*product style*/ .product-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; } .product-list li { margin: 20px; text-align: center; width: 30%; display: inline-block; vertical-align: top; } .product-image { width: 250px; border: 4px solid #1a1a1a; border-radius: 8px; } .product-details { margin-top: 10px; } .product-name { font-weight: bold; } .product-price { color: #007bff; font-size: 18px; } .star-rating { color: #ffc107; font-size: 24px; margin-top: 5px; } .additional-details { margin-top: 40px; text-align: center; } .additional-details h2 { font-size: 24px; color: #333; } .additional-details ul{ padding: 0; margin: 20px 0; } .additional-details ol { list-style-type: decimal; padding: 0; margin: 20px 0; } .additional-details ul li, .additional-details ol li { margin-bottom: 10px; } .additional-details table { width: 80%; margin: 20px auto; border-collapse: collapse; border: 2px solid #1a1a1a; } .additional-details th { background-color: #1a1a1a; color: #fff; border: 1px solid #ddd; padding: 15px; text-align: left; } .additional-details td { background-color: #f5f5f5; border: 1px solid #ddd; padding: 15px; } .additional-details ul { list-style: none; padding: 0; margin: 20px 0; } .additional-details ul li { background-color: #f2f2f2; padding: 10px; margin-bottom: 10px; border-radius: 5px; } .additional-details ol { list-style-type: decimal; padding: 0; margin: 20px 0; } .additional-details ol li { background-color: #e0e0e0; padding: 10px; margin-bottom: 10px; border-radius: 5px; } /*style to enquire.html */ #enquire { padding: 40px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; text-align: center; margin: 20px; } #enquire h2 { color: #1a1a1a; font-size: 24px; margin-bottom: 20px; } form { max-width: 500px; margin: 0 auto; } form label { display: block; margin-bottom: 10px; color: #333; font-weight: bold; } form input, form textarea { width: 100%; padding: 12px; margin-bottom: 20px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 5px; transition: border-color 0.3s ease-in-out; } form input:focus, form textarea:focus { border-color: #1a1a1a; } form button { background-color: #1a1a1a; color: #fff; padding: 15px 25px; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease-in-out; } form button:hover { background-color: #333; } /*style for enquire.html*/ #tableInquire { width: 100%; border-collapse: collapse; margin-top: 30px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } #tableInquire th, #tableInquire td { border: 1px solid #ddd; padding: 12px; text-align: left; } #tableInquire th { background-color: #1a1a1a; color: #fff; } #tableInquire tbody tr:nth-child(even) { background-color: #f5f5f5; } #tableInquire tbody tr:hover { background-color: #e0e0e0; transition: background-color 0.3s ease-in-out; } /*style for about.html*/ .main { max-width: 800px; margin: 20px auto; padding: 20px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } .section-title { color: #333; } .details-table { width: 100%; border-collapse: collapse; margin-top: 20px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } .table-row { border: 1px solid #ddd; } .label, .value { padding: 10px; background-color: #1a1a1a; color: #fff; font-weight: bold; } .requirements-list { list-style: none; padding-left: 0; } .requirement { background-color: #f2f2f2; padding: 10px; margin-bottom: 10px; border-radius: 5px; } .liabout { margin-bottom: 5px; } .aabout { color: #1a1a1a; text-decoration: none; font-weight: bold; } .aabout:hover { text-decoration: underline; } .reflection-section { margin-top: 20px; } .reflection-paragraph { margin-bottom: 10px; } .resource-paragraph { margin-top: 10px; } .resource-link { color: #1a1a1a; text-decoration: none; font-weight: bold; } .resource-link:hover { text-decoration: underline; } /*style to enhancements.html page */ main { max-width: 800px; margin: 20px auto; padding: 20px; background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } #enhancements { text-align: center; } .enhancement-section { margin-bottom: 20px; } .enhancement-section h3 { color: #1a1a1a; } /* Enhancement Table Styles */ .enhancement-table { width: 100%; margin-top: 20px; background-image: url('../m/image.jpg'); background-size: cover; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } .enhancement-table th, .enhancement-table td { border: 1px solid #ddd; padding: 12px; text-align: left; } .enhancement-table th { background-color: #1a1a1a; color: #fff; } .enhancement-table tr:nth-child(even) { background-color: #f5f5f5; } .enhancement-table tr:hover { background-color: #e0e0e0; transition: background-color 0.3s ease-in-out; }
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>