Skip to content

Michoel-89/html-css-reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML tags for reference

  1. <!DOCTYPE>: This declaration defines the document type and version of HTML being used.
<!DOCTYPE html>
  1. <html>: The root element that contains all other HTML elements on the page.
<html>
   <!-- other HTML elements go here -->
</html>
  1. <head>: Contains meta-information about the document, such as the title and links to external resources.
<head>
   <!-- meta-information goes here -->
</head>
  1. <title>: Sets the title of the web page, which is displayed in the browser's title bar or tab.
<title>Page Title</title>
  1. <meta>: Provides metadata about the HTML document, such as character encoding and author information.
<meta charset="UTF-8">
<meta name="author" content="Your Name">
  1. <link>: Used to link external resources, like CSS stylesheets, to the HTML document.
<link rel="stylesheet" href="styles.css">
  1. <style>: Defines inline CSS styles for specific elements on the page.
<style>
   /* CSS styles go here */
</style>
  1. <script>: Used to include JavaScript code in the HTML document.
<script>
   // JavaScript code goes here
</script>
  1. <body>: Contains the visible content of the web page, including text, images, and other elements.
<body>
   <!-- page content goes here -->
</body>
  1. <h1>, <h2>, <h3>, <h4>, <h5>, <h6>: Headings of decreasing importance, with <h1> being the most important and <h6> the least.
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<!-- ... -->
<h6>Heading 6</h6>
  1. <p>: Represents a paragraph of text.
<p>This is a paragraph of text.</p>
  1. <a>: Creates hyperlinks to other web pages or resources.
<a href="https://example.com">Visit Example.com</a>
  1. <img>: Embeds images in the web page.
<img src="image.jpg" alt="Description of the image">
  1. <ul>: Defines an unordered list, often used with <li> elements.
<ul>
   <li>Item 1</li>
   <li>Item 2</li>
   <!-- ... -->
</ul>
  1. <ol>: Defines an ordered list, where list items are automatically numbered.
<ol>
   <li>First item</li>
   <li>Second item</li>
   <!-- ... -->
</ol>
  1. <li>: List item element, used within <ul> and <ol> to define individual list items.
<ul>
   <li>Item 1</li>
   <li>Item 2</li>
</ul>
  1. <div>: A generic container element often used for grouping and styling content.
<div>
   <!-- content goes here -->
</div>
  1. <span>: A generic inline container element for applying styles or scripting to a specific portion of text.
<span style="color: red;">This is red text.</span>
  1. <br>: Inserts a line break, useful for breaking text onto the next line without starting a new paragraph.
<p>This is some text.<br>And this is on a new line.</p>
  1. <hr>: Creates a horizontal rule or line to separate content.
<hr>
  1. <table>: Defines a table, which can be populated with rows and cells.
<table>
   <!-- table content goes here -->
</table>
  1. <tr>: Represents a table row.
<tr>
   <!-- table cells go here -->
</tr>
  1. <th>: Defines a table header cell.
<th>Header Cell</th>
  1. <td>: Represents a table data cell.
<td>Data Cell</td>
  1. <form>: Used to create web forms for user input.
<form action="/submit" method="post">
   <!-- form elements go here -->
</form>
  1. <input>: An input field within a form, used for text, checkboxes, radio buttons, etc.
<input type="text" name="username">
  1. <button>: A clickable button often used in forms.
<button type="submit">Submit</button>
  1. <textarea>: A multiline text input field within a form.
<textarea rows="4" cols="50">
   Enter text here...
</textarea>
  1. <label>: Describes the purpose of an input element in a form.
<label for="username">Username:</label>
<input type="text" id="username" name="username">
  1. <select>: Creates a dropdown list within a form.
<select>
   <option value="option1">Option 1</option>
   <option value="option2">Option 2</option>
</select>
  1. <option>: Represents an option in a <select> dropdown.
<select>
   <option value="option1">Option 1</option>
   <option value="option2">Option 2</option>
</select>

Basic CSS Properties for Web Styling

  1. Size and Spacing:
    • width: Controls the width of an element.
    • height: Controls the height of an element.
    • margin: Sets the outer margin of an element.
    • padding: Sets the inner padding of an element.
.example-element {
    width: 200px;
    height: 100px;       
    margin: 10px;
    padding: 20px;
} 
  1. Text Styling:
    • font-size: Sets the size of the text.
    • font-family: Defines the type of font.
    • color: Specifies the color of the text.
.example-text {
    font-size: 16px;
    font-family: "Arial", sans-serif;
    color: #333;
}
  1. Layout:
    • display: Defines how an element is displayed (block, inline, etc.).
    • float: Positions an element to the left or right within its container.
.layout-container {
    display: flex;
    float: right;
}
  1. Positioning:
    • position: Sets the positioning method (static, relative, absolute, fixed).
.positioned-element {
    position: relative;
    top: 20px;
    left: 30px;
}
  1. Border and Box Model:
    • border: Sets the border of an element.
    • box-sizing: Defines how the width and height of an element are calculated.
.bordered-element {
    border: 1px solid #000;
    box-sizing: border-box;
}
  1. Background:
    • background-color: Sets the background color of an element.
    • background-image: Sets the background image of an element.
.background-element {
    background-color: #f0f0f0;
    background-image: url('background.jpg');
}
  1. Text Alignment:
    • text-align: Aligns text within its container.
.aligned-text {
    text-align: center;
}
  1. List Styling:
    • list-style-type: Sets the style of list items.
.styled-list {
    list-style-type: square;
}
  1. Link Styling:
    • text-decoration: Removes underlines from links (commonly set to none).
    • hover: Changes the style when the mouse hovers over a link.
.styled-link {
    text-decoration: none;
}
.styled-link:hover {
    color: #FF5733; /* Example color change on hover */
}
  1. Visibility:
    • display: none: Hides an element.
.hidden-element {
    display: none;
}

Basic terminal (ubuntu) commands

  • pwd

    • stands for: print working directory
    • means: current location in Ubuntu
  • ls

    • stands for: list
    • means: print all the folders and files in this directory
  • clear

    • means: clear screen
  • cd

    • means: change directory
  • touch

    • means: create a new file
  • mkdir

    • means: create a new folder
  • explorer.exe

    • means: open a file in the browser
  • tree

    • means: shows the file structure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published