SlideShare a Scribd company logo
A COMPLETE HTML AND CSS
GUIDELINES FOR BEGINNERS
If you are new at html & css then you
should familiar about these Guidelines
before start. Let’s discuss about HTML and
CSS Guidelines for Beginners in this post
for better UI and UX designs.
Guidelines to follow
Html
CSS
Class
Section
Single page CSS
CSS/JavaScript custom file
Proper commenting
Code reusability
CSS according framework
Code check
HTML – Hypertext Markup Language:
All critical website content should be added
to the website using a markup language
such as HTML.
Proper comment section should be used
before writing any code because it will help
us in identifying why this code has been
written and what is the use.
Always add “alt” attributes to images
because it will help when an image for
some reason cannot be displayed Use
lower case element and attribute names.
Use correct document type – Always
declare the document type as the first line
in your document.
Close all HTML elements and quote the
attribute values.
Do not add blank lines & indentation
unnecessarily.
Avoid code lines over 80 characters.
Representation of HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<!-- website templates CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstr
<!-- custom CSS -->
<link rel="stylesheet" type="text/css" href="m
<!-- website templates fonts -->
<link href="https://fonts.googleapis.com/css?f
</head>
<body>
<div id="header">
<div class="header">
<div class="nav"></div>
</div>
</div>
21
22
23
24
25
26
27
28
</body>
<!-- jQuery library -->
<script
src="https://ajax.googleapis.com/ajax/libs/jque
<!-- website template JavaScript -->
<script
src="https://maxcdn.bootstrapcdn.com/bootstra
<!-- custom date picker JavaScript -->
<script src="/js/myScript1.js"></script>
</html>
CSS – Cascading style sheets:
Presentation of the website content should
be defined by a styling language such as
CSS.
Use simple syntax for linking to style sheets
(the type attribute is not necessary) with
proper comments.
Place the opening bracket on the same line
as the selector
Use one space before the opening bracket
Use two spaces for indentation
Use semicolon after each property-value pair,
including the last
Only use quotes around values if the value
contains spaces
Place the closing bracket on a new line,
without leading spaces
Avoid lines over 80 characters
New file should be used for creating CSS
Representation of CSS:
1
2
body {
overflow-x: hidden !important;
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
display: block;
font-family: 'Open Sans', sans-serif
!important;
color: #000;
}
h1, h2, h3, h4, h5, h6, p, span, a, ul, li {
margin: 0px;
padding: 0px;
}
a:hover, a:focus {
text-decoration: none;
color: #1A237E
}
25
26
27
28
29
30
31
32
33
34
/* header section CSS*/
.header{}
/* mid-section CSS*/
.mid{}
/* footer section CSS*/
Class:
If there are multiple elements on a single
web page and that need to be styled then
we use classes. For example, let’s say that
you want give a redirect a particular button
to some site or at new page or at pressing
the button it’s color should be change. So
for modifying colors & redirecting page to
some link we use classes and for that you
could add a class to each of those button or
the container holding the buttons.
Representation of classes:
1
2
3
4
5
6
7
8
9
10
11
12
13
.bgcolor {
width: 100%;
float: left;
height: 700px;
background-color: #4ca368;
}
div.cities {
background-color: black;
color: white;
margin: 20px 0 20px 0;
padding: 20px;
14 }
CSS/JavaScript custom file:
We are using a framework using different
libraries then we should not change the
library files instead of that we should create
another file and then do the customization.
For example, in bootstrap, we are using a
navbar and it contains its own CSS file
navbar-default and we are asked to change
in that particular file so for that we’ll create
a new custom CSS file.
Bootstrap library file:
1
2
3
.navbar-default {
text-decoration: none;
background color: #1A237E;
4
5
6
7
8
9
10
11
}
Custom file
.navbar-default {
background color: #5aD782;
color: #ff00ff;
}
CSS According Framework:
A framework is defined as a package made
up of the structure of files and folders of
standardized code (HTML, CSS, JS
documents etc.) which can be used to
support the development of the website, as
a basis to start building a site. So as to use
framework we should place the library
along with proper commenting.
Representation of Library:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstr
<!-- jQuery library -->
<script
src="https://ajax.googleapis.com/ajax/libs/jque
<!-- Latest compiled JavaScript -->
<script
src="https://maxcdn.bootstrapcdn.com/bootstra
<div class="container">
<div class="row">
<div class="col-sm-4">
<h3>Column 1</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
20
21
22
23
24
25
26
27
28
<div class="col-sm-4">
<h3>Column 2</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
<div class="col-sm-4">
<h3>Column 3</h3>
<p>Lorem ipsum dolor..</p>
<p>Ut enim ad..</p>
</div>
</div>
</div>
Single Page CSS:
For every page, there should be separate
CSS file and it should contain the
information about that particular page only.
For example, let’s say there are four pages
(Home, About Us, Products Contact Us) so
for each and every page there should be
separate CSS file with proper commenting
and relevant names.
Code Re-usability:
Code which shares a very similar or
identical structure should be written in such
a way that it can be used further. The aim
of code reusability is to provide a common
structure so that developers don’t have to
redo it from scratch and can reuse the code
provided. In this way, code reusability
allows us to cut out much of the work and
save a lot of time.
Code Check:
Before submitting the code it should be
reviewed and checked properly maintaining
the above guidelines rules. It will help
understand the third party user easily
without facing any difficulties.
In this post we discuss html and css
guidelines for absolute beginners.
We are web application
development and mobile app
development experts. Discuss with us
about your project: Contact Us
Hope you found this post helpful, so don’t
forget to share with friends.

More Related Content

What's hot

Html & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopHtml & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshop
Vero Rebagliatte
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
St. Petersburg College
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
Chris Love
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
Sun Technlogies
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
Html & CSS
Html & CSSHtml & CSS
Html & CSS
JainilSampat
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
eShikshak
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
SiddhantSingh980217
 
Css tips & tricks
Css tips & tricksCss tips & tricks
Css tips & tricks
anubavam-techkt
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
 
David Weliver
David WeliverDavid Weliver
David Weliver
Philip Taylor
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
HalaiHansaika
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
Harshita Yadav
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
Hawkman Academy
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
danpaquette
 
Css
CssCss
Css introduction
Css  introductionCss  introduction
Css introduction
Nicha Jutasirivongse
 

What's hot (20)

Html & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopHtml & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshop
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
Html & CSS
Html & CSSHtml & CSS
Html & CSS
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
Css tips & tricks
Css tips & tricksCss tips & tricks
Css tips & tricks
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Css
CssCss
Css
 
Css introduction
Css  introductionCss  introduction
Css introduction
 

Similar to A complete html and css guidelines for beginners

Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
Css
CssCss
Css
CssCss
Css
CssCss
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
Tesfaye Yenealem
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
kassahungebrie
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
 
Css basic
Css basicCss basic
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
SURYANARAYANBISWAL1
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
ssuser568d77
 
Cascstylesheets
CascstylesheetsCascstylesheets
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
Sanjoy Kr. Paul
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
Tushar Rajput
 
Css
CssCss
Css
CssCss
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
William Myers
 

Similar to A complete html and css guidelines for beginners (20)

Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
 
Css basic
Css basicCss basic
Css basic
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Cascstylesheets
CascstylesheetsCascstylesheets
Cascstylesheets
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 

Recently uploaded

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 

Recently uploaded (20)

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 

A complete html and css guidelines for beginners

  • 1. A COMPLETE HTML AND CSS GUIDELINES FOR BEGINNERS If you are new at html & css then you should familiar about these Guidelines before start. Let’s discuss about HTML and CSS Guidelines for Beginners in this post for better UI and UX designs.
  • 2. Guidelines to follow Html CSS Class Section Single page CSS CSS/JavaScript custom file Proper commenting Code reusability CSS according framework Code check HTML – Hypertext Markup Language: All critical website content should be added to the website using a markup language such as HTML. Proper comment section should be used before writing any code because it will help
  • 3. us in identifying why this code has been written and what is the use. Always add “alt” attributes to images because it will help when an image for some reason cannot be displayed Use lower case element and attribute names. Use correct document type – Always declare the document type as the first line in your document. Close all HTML elements and quote the attribute values. Do not add blank lines & indentation unnecessarily. Avoid code lines over 80 characters.
  • 4. Representation of HTML: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <!-- website templates CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstr <!-- custom CSS --> <link rel="stylesheet" type="text/css" href="m <!-- website templates fonts --> <link href="https://fonts.googleapis.com/css?f </head> <body> <div id="header"> <div class="header"> <div class="nav"></div> </div> </div>
  • 5. 21 22 23 24 25 26 27 28 </body> <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jque <!-- website template JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstra <!-- custom date picker JavaScript --> <script src="/js/myScript1.js"></script> </html> CSS – Cascading style sheets: Presentation of the website content should be defined by a styling language such as CSS. Use simple syntax for linking to style sheets
  • 6. (the type attribute is not necessary) with proper comments. Place the opening bracket on the same line as the selector Use one space before the opening bracket Use two spaces for indentation Use semicolon after each property-value pair, including the last Only use quotes around values if the value contains spaces Place the closing bracket on a new line, without leading spaces Avoid lines over 80 characters New file should be used for creating CSS Representation of CSS: 1 2 body { overflow-x: hidden !important;
  • 7. 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 display: block; font-family: 'Open Sans', sans-serif !important; color: #000; } h1, h2, h3, h4, h5, h6, p, span, a, ul, li { margin: 0px; padding: 0px; } a:hover, a:focus { text-decoration: none; color: #1A237E }
  • 8. 25 26 27 28 29 30 31 32 33 34 /* header section CSS*/ .header{} /* mid-section CSS*/ .mid{} /* footer section CSS*/ Class: If there are multiple elements on a single web page and that need to be styled then we use classes. For example, let’s say that you want give a redirect a particular button to some site or at new page or at pressing
  • 9. the button it’s color should be change. So for modifying colors & redirecting page to some link we use classes and for that you could add a class to each of those button or the container holding the buttons. Representation of classes: 1 2 3 4 5 6 7 8 9 10 11 12 13 .bgcolor { width: 100%; float: left; height: 700px; background-color: #4ca368; } div.cities { background-color: black; color: white; margin: 20px 0 20px 0; padding: 20px;
  • 10. 14 } CSS/JavaScript custom file: We are using a framework using different libraries then we should not change the library files instead of that we should create another file and then do the customization. For example, in bootstrap, we are using a navbar and it contains its own CSS file navbar-default and we are asked to change in that particular file so for that we’ll create a new custom CSS file. Bootstrap library file: 1 2 3 .navbar-default { text-decoration: none; background color: #1A237E;
  • 11. 4 5 6 7 8 9 10 11 } Custom file .navbar-default { background color: #5aD782; color: #ff00ff; } CSS According Framework: A framework is defined as a package made up of the structure of files and folders of standardized code (HTML, CSS, JS documents etc.) which can be used to support the development of the website, as a basis to start building a site. So as to use framework we should place the library along with proper commenting.
  • 12. Representation of Library: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstr <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jque <!-- Latest compiled JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstra <div class="container"> <div class="row"> <div class="col-sm-4"> <h3>Column 1</h3> <p>Lorem ipsum dolor..</p> <p>Ut enim ad..</p> </div>
  • 13. 20 21 22 23 24 25 26 27 28 <div class="col-sm-4"> <h3>Column 2</h3> <p>Lorem ipsum dolor..</p> <p>Ut enim ad..</p> </div> <div class="col-sm-4"> <h3>Column 3</h3> <p>Lorem ipsum dolor..</p> <p>Ut enim ad..</p> </div> </div> </div> Single Page CSS: For every page, there should be separate CSS file and it should contain the information about that particular page only. For example, let’s say there are four pages (Home, About Us, Products Contact Us) so
  • 14. for each and every page there should be separate CSS file with proper commenting and relevant names. Code Re-usability: Code which shares a very similar or identical structure should be written in such a way that it can be used further. The aim of code reusability is to provide a common structure so that developers don’t have to redo it from scratch and can reuse the code provided. In this way, code reusability allows us to cut out much of the work and save a lot of time. Code Check: Before submitting the code it should be reviewed and checked properly maintaining
  • 15. the above guidelines rules. It will help understand the third party user easily without facing any difficulties. In this post we discuss html and css guidelines for absolute beginners. We are web application development and mobile app development experts. Discuss with us about your project: Contact Us Hope you found this post helpful, so don’t forget to share with friends.