Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Styles of Fonts with HTML

You can style your fonts in three basic ways:

...

Panel
borderColorgrey
bgColorazul
titleColorblack
titleBGColorlemonchiffon
borderStylesolid
titleBrowser Results Italics&Bold
Html bobswift
<strong><em>To get your text italics and bold, do this.</em></strong>

Font Colors and

...

Sizes with HTML

Another couple of different simple formatting options you can do in REDCap surveys or forms is having different font colors and font sizes.

...

Panel
borderColorgrey
bgColorazul
titleColorblack
titleBGColorlemonchiffon
borderStylesolid
titleBrowser Results Font Sizes
Html bobswift
<div style="font-size: 10pt">This is how you change the size of the font.</div>
 
<div style="font-size: 14pt">This is how you change the size of the font.</div>
 
<div style="font-size: 20pt">This is how you change the size of the font.</div>
 
<div style="font-size: 22pt">This is how you change the size of the font.</div> 
 


<p style="font-weight:normal;">Here is a selection of text styles:</p> 

<p style="color:red; font-size:75%;">small and red<p> 

<p style="color:green; font-weight:bold; font-size:150%;">bold, large and green</p> 

<p style="color:blue; font-family: monospace;">blue monospace</p> 

<p style="display:block; padding:5px; border:1px black 

 

 

 

Background Class Colors with CSS

REDCap's css includes some familiar background-colored warning boxes. Here is an example where a descriptive text question is used as a warning when someone tries to collect another time point in a longitudinal study without checking the enrollment status of the participant first. The code presented below is placed in the Field Label column (column E) in your data dictionary, or the Field Label box in the Online Designer.

...

Highlight a sub-section within a larger section with CSS

This can be used to highlight or distinguish sub-sections within a larger section, without using the Section Header column. This is a 'descriptive' field.

...

Smaller italic text for additional data in a question with CSS

Here is a common one for adding some meta-data to a question.

...

Text in a box and colored, centered, larger text using H3 with CSS

The code looks like: (with some extra carriage returns so it doesn't scroll so far to the right)

Code Block
<p style="border:1px solid black;padding:2px;">
<span style="display:block;border:1px solid grey;padding:10px;font-size: 125%;">
I am going to ask you a few questions to determine whether you are eligible to be in the study. 
<span style="font-weight: normal; font-style:italic;">
[Interviewer: Ask all questions without stopping until you reach "Determine Eligibility before continuing!"]
</span></span></p>
<h3 style="text-align: center; color: #800000;">Identifying Information</h3>
1. Name:

 

 

Highlighting 

Image Added

The code looks like:

Code Block
Smaller italic text for additional data in a question with CSS
Here is a common one for adding some meta-data to a question.

The code looks like:
Were antiplatelet drugs begun on any day prior to the procedure date listed above?
<span style="font-weight: lighter; font-style:italic;">(your text here)</span>

 

 

 

Additional Tags

There are also additional tags that are currently supported when making REDCap forms and surveys. 

These following tags may be used to define paragraphs, anchors (web links), and line breaks: 

Line Break 

<br>

Paragraphs 

<p>.......</p>

Anchors (web links) 

<a>.......</a>

Indent

&nbsp;