Care Plan HTML and CSS usage
- 1.1 1. Allowed Tags Overview
- 1.1.1 1.1 Structural Tags
- 1.1.2 1.2 Text Formatting Tags
- 1.1.3 1.3 List Tags
- 1.1.4 1.4 Table Tags
- 1.1.5 1.5 Image Tags
- 1.1.6 1.6 Anchor Tags
- 1.1.7 1.7 Empty Tags
- 1.2 2. Allowed CSS Properties
- 1.2.1 2.1 Text Styling
- 1.2.2 2.2 Box Model
- 1.2.3 2.3 Background and Positioning
- 1.3 3. Usage Rules
- 1.3.1 3.1 General Attributes
- 1.3.2 3.2 Empty Tags
- 1.1 1. Allowed Tags Overview
- 2 Appendix: Working Examples
- 2.1 1. Section Divider
- 2.2 2. Separator
- 2.3 3. Textarea
- 2.4 4. Text Input
- 2.5 5. Date Input
- 2.6 6. Checkbox
- 2.7 7. Radio Buttons
- 2.8 8. Professional Lock Sections
- 2.9 9. Collapsible Section
- 3 Appendix: Allowed CSS Properties
- 3.1 1. General Properties
- 3.1.1 1.1 position
- 3.1.2 1.2 border-radius
- 3.1.3 1.3 opacity
- 3.2 2. Background Properties
- 3.2.1 2.1 background
- 3.2.2 2.2 background-attachment
- 3.2.3 2.3 background-color
- 3.3 3. Text and Visual Properties
- 3.3.1 3.1 color
- 3.3.2 3.2 text-shadow
- 3.3.3 3.3 letter-spacing
- 3.3.4 3.4 line-height
- 3.3.5 3.5 word-spacing
- 3.4 4. Box Model Properties
- 3.4.1 4.1 margin
- 3.4.2 4.2 border-spacing
- 3.4.3 4.3 clip
- 3.4.4 4.4 overflow
- 3.5 5. List and Display Properties
- 3.5.1 5.1 list-style-type
- 3.5.2 5.2 list-style-position
- 3.5.3 5.3 list-style-image
- 3.6 6. Interactive and Cursor Properties
- 3.6.1 6.1 cursor
- 3.6.2 6.2 outline-color
- 3.1 1. General Properties
- 4 Appendix: Raw XML list
- 4.1 Notes
1. Allowed Tags Overview
Patients Know Best’s care plans accept HTML and CSS for rich multimedia displays of information to the patient. For security purposes, PKB cannot accept all tags in the medical record. This guide shows what care tags work and how they work within a care plan.
1.1 Structural Tags
<div>
: General block container.<span>
: General inline container.
1.2 Text Formatting Tags
<p>
,<h1>
–<h6>
,<b>
,<i>
,<u>
,<strong>
,<em>
,<small>
,<sub>
,<sup>
,<blockquote>
,<code>
.
1.3 List Tags
<ul>
,<ol>
,<li>
.
1.4 Table Tags
<table>
,<thead>
,<tbody>
,<tfoot>
,<tr>
,<th>
,<td>
.
1.5 Image Tags
<img>
:Allowed attributes:
src
,alt
,width
,height
.
1.6 Anchor Tags
<a>
:Allowed attributes:
href
,target="_blank"
.
1.7 Empty Tags
Tags explicitly allowed to be empty:
<br>
,<hr>
.
2. Allowed CSS Properties
Only the following CSS properties are allowed:
2.1 Text Styling
font-size
font-style
font-weight
text-align
text-decoration
line-height
letter-spacing
color
2.2 Box Model
margin
padding
border
width
height
2.3 Background and Positioning
background-color
background-image
position
(onlystatic
,inherit
)
3. Usage Rules
3.1 General Attributes
The following attributes are allowed on all tags:
id
class
lang
title
Attribute values must comply with:
id
: Letters and numbers only.Colours:
#hex
, named colours,rgb()
.
3.2 Empty Tags
Use
<br>
or<hr>
for line breaks or horizontal rules without adding content.
Appendix: Working Examples
1. Section Divider
Tag:
<div>
Purpose: The
<div>
tag is used to create a section divider with specific styling, such as a background colour or alignment.Allowed Attributes:
class
: Specifies a CSS class, e.g.,cp_secondaryTitle
.Inline styles (
style
): Only validated properties such as:height
background-color
text-align
margin-bottom
Example:
<div class="cp_secondaryTitle">
// Section Title Goes Here //
</div>
2. Separator
Tag: <hr>
Purpose: Creates a horizontal line to visually separate content.
Allowed Attributes:
Inline styles (style): Only validated properties such as:
height
background-color
margin-top
margin-bottom
Example:
<hr style="height: 3px; background-color: #f5f8f9; margin-top: 40px; margin-bottom: 40px;"/>
3. Textarea
Tag:
<textarea>
Purpose: Allows users to input multi-line text.
Allowed Attributes:
id
: Unique identifier following[a-zA-Z0-9\-_\$]+
.name
: Required and follows the same pattern asid
.rows
: Specifies the number of visible lines (positive integer).placeholder
: Optional text hint for the input area.Inline styles (
style
): Only validated properties such as:width
Example:
<div class="row" style="margin-top: 15px;">
<div class="col-sm-12">
<label for="cp_">Enter your text:</label>
<textarea class="form-control" name="REPLACE" id="REPLACE" rows="3" style="width: 100%;"></textarea>
</div>
</div>
4. Text Input
Tag:
<input>
Purpose: Creates a single-line text box where users can type information.
Allowed Attributes:
type
: Specifies the type of input, e.g.,text
.id
: Unique identifier following[a-zA-Z0-9\-_\$]+
.name
: Used to identify the input when the form is submitted.class
: Assigns a CSS class to the input.Inline styles (
style
): Only validated properties such as:width
Example:
5. Date Input
Tag:
<input>
Purpose: Creates a date picker field for users to select a date.
Allowed Attributes
type
: Must be set todate
.id
: Unique identifier following the regex pattern[a-zA-Z0-9\-_\$]+
.name
: Specifies the name for the input element in the form submission, following the same regex asid
.placeholder
: Provides a hint to the user, allowing any text string.class
: Assigns a CSS class to apply predefined styles (e.g.,form-control
).style
: Allows inline styles with validated CSS properties, such aswidth
.value
: Specifies a pre-filled date value, matching theyyyy-mm-dd
format.
Example:
6. Checkbox
Tags:
<input>
and<label>
Purpose: Allows users to select multiple options from a group.
Allowed Attributes:
type
: Must becheckbox
.id
: Unique identifier.name
: Groups related checkboxes for submission.value
: Specifies the value of the checkbox.
Example:
7. Radio Buttons
Tags:
<input>
and<label>
Purpose: Allows users to select one option from a group.
Allowed Attributes:
type
: Must beradio
.id
: Unique identifier.name
: Groups related radio buttons.value
: Specifies the value of the button.
Example:
8. Professional Lock Sections
Tag:
<fieldset>
Purpose: The
<fieldset>
tag groups form elements and is used here to define content restricted for professional users.Allowed Attributes:
class
: Used to apply specific styles; in this case,pro-only
.Inline styles (
style
): None
9. Collapsible Section
Tags:
<details>
and<summary>
Purpose: Creates an expandable section where the user can toggle visibility of the content by clicking a title.
Allowed Attributes:
<details>
: No specific attributes are required for basic functionality.<summary>
: Can include other valid tags (e.g.,<div>
and<span>
) for styling.
Basic Example:
Professional Lock Example:
This document only includes allowed tags and attributes based on the validator's configuration. Each example demonstrates practical usage for clarity. The examples given conform with WCAG AA accessibility and system styling. It is strongly recommended to use these examples to maintain this useability.
Appendix: Allowed CSS Properties
This section lists all the CSS properties and their permissible values that are allowed through the validator.
1. General Properties
1.1 position
Allowed Values:
relative
,absolute
,static
,inherit
.
1.2 border-radius
Allowed Values:
Length values (e.g.,
px
,em
,%
).
1.3 opacity
Allowed Values:
Numbers (0.0–1.0) or percentage values.
2. Background Properties
2.1 background
Description: Shorthand for other background-related properties.
Allowed Sub-Properties:
background-color
background-image
background-repeat
background-attachment
background-position
2.2 background-attachment
Allowed Values:
scroll
,fixed
,inherit
.
2.3 background-color
Allowed Values:
Named colours (e.g.,
red
,blue
).Hex codes (e.g.,
#ff0000
,#fff
).RGB values (e.g.,
rgb(255, 0, 0)
).transparent
,inherit
.
3. Text and Visual Properties
3.1 color
Allowed Values:
Named colours (e.g.,
red
,blue
).Hex codes (e.g.,
#ffffff
,#000
).RGB values (e.g.,
rgb(255, 0, 0)
).System colours.
3.2 text-shadow
Allowed Values:
none
,inherit
.Length values for offsets and colour values for shadows.
3.3 letter-spacing
Allowed Values:
normal
,inherit
, length values.
3.4 line-height
Allowed Values:
normal
,inherit
, number, length, or percentage.
3.5 word-spacing
Allowed Values:
normal
,inherit
, length values.
4. Box Model Properties
4.1 margin
Allowed Values:
auto
,inherit
, positive lengths or percentages.
4.2 border-spacing
Allowed Values:
inherit
, lengths (positive only).
4.3 clip
Allowed Values:
auto
,inherit
.
4.4 overflow
Allowed Values:
visible
,hidden
,scroll
,inherit
.
5. List and Display Properties
5.1 list-style-type
Allowed Values:
disc
,circle
,square
,decimal
,lower-roman
,upper-roman
.
5.2 list-style-position
Allowed Values:
inside
,outside
,inherit
.
5.3 list-style-image
Allowed Values:
none
,inherit
.
6. Interactive and Cursor Properties
6.1 cursor
Allowed Values:
auto
,pointer
,move
,text
,default
,inherit
.
6.2 outline-color
Allowed Values:
Colour values,
invert
,inherit
.
Appendix: Raw XML list
This list represents all CSS properties and their values that the validator allows.
Notes
If specific use cases fall outside these guidelines, consult with a PKB team member for validation.